JQuery Tool class functions-browser information

Source: Internet
Author: User

In jquery, the $.browser object can be used to get the name and version information of the browser, such as $.browser.chrome true, the current Chrome browser, $.browser.mozilla is true, the current Firefox browser, but also through the $.browser.version way to get browser version information.

<body> <div id= "Divtest" > <div class= "title" > <span class= "FL" > Get browser Name and version number &lt ;/span> </div> <div class= "content" ></div> </div> <script type= "Text/ja Vascript ">        $(function () {            varstrtmp = "Your browser name is:"; if($.browser.chrome) {//Google ChromeStrtmp + = "Chrome"; }            if($.browser.mozilla) {//Firefox-related browsersStrtmp + = "Mozilla FireFox"; } strtmp+ = "<br/><br/> Version number is:"//Get version number+$.browser.version; $(". Content"). HTML (strtmp);    }); </script></body>

JQuery Tool class functions-browser information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.