How to determine the Opera browser using JavaScript

后端 未结 6 916
清歌不尽
清歌不尽 2020-12-14 17:09

I want to determine that the browser of the client machines in Opera or not using JavaScript, how to do that?

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-14 18:02

    do you mind using jQuery?

    then you can use jQuery.browser (see documnentation)

    But the jQuery-guys recommend not to use this.

    We recommend against using this property, please try to use feature detection instead (see jQuery.support)

    Edit:

    For Mootools: use window.opera (see documentation)

提交回复
热议问题