Alibabacloud.com offers a wide variety of articles about opera browser old version, easily find your opera browser old version information here online.
In jquery, the $.browser object allows you to get the name and version information of the browser, such as $.browser.chrome true, which means that the current Chrome browser, $. Browser.mozilla is true to indicate that it is currently a Firefox browser and can be $.browser.v
I made a business to judge the browser type and version number, and recorded the relevant js code. I personally feel pretty good, you can refer to the following two days to make a business that judges the browser type and version number, and record the relevant js Code:
The Code is as follows:
Function allinfo (){Va
Get browser information via JSThe Navigator object contains information about the browser.Navigator Object Properties and methods:test results for IE:test results for Firefox:Get the specific IE version number:Java code
function Checkieversion () {
var ua = navigator.useragent;
var s = "MSIE";
var i = Ua.indexof (s)
if (i >= 0) {
//Get IE version
Detects browser versions, cores, systems, and whether to move the end
Copy Code code as follows:
/**
* Check Browser version
* @authors K
* @date 2014-04-11 14:48:39
* @version 1
*/
/*** Detect browser info with navigator useragent* @return Object
Kingsoft's cheetah browser has just released version 2.0 beta), and the kernel is upgraded to Chrome 21. According to their evaluation results, the speed and performance of the 2.0 version of the cheetah browser have been improved by more than 50% after the upgrade. In addition, the new
This example describes how PHP gets the user browser version. Share to everyone for your reference. The specific analysis is as follows:
In PHP we have a global variable $_server[' http_user_agent '], we can get all the user information, we have to be processed to determine what type of user browser, the following function can be accurate user
In many browser products, IE, Firefox, Opera, Safari ... Many brands are different standards, so often need to be based on different browsers, and even different versions of the same browser to do various operations, so it is important to know the way the browser is judged. Here's a list of common methods of judging
1
A common but overestimated Javascript function is browser detection. Sometimes, you may want to give a description or load a page to prompt users to avoid using browsers such as Safari.
Usage:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Browser name: BrowserDetect. browser
was useless. I couldn't see the effect, and I couldn't see it with the review elements. I simply added a style and made all the fonts in uppercase, and the results were all in uppercase, the style application is on ~ I don't know what's wrong this time ~ After a hundred twists and turns, I realized that the previous projects were displayed in light gray, but a div is normally displayed in white, the other three inputs are displayed in gray, the design draft is white, and Google is also displaye
! @*/! 1; Ie = document. expando; // document. all also has Ie =/\ W/in the earlier versions of opera Firefox /. test ('\ u0130') // IE6 = is provided by the ABCD in the group! "1" [0] // IE6 or ie5 strings cannot use the attribute IE8 = !! Window. xdomainrequest; ie9 = document.doc umentmode document.doc umentmode = 9; // self-developed, conditional-compiled sniffing script. ie returns the JS engine version
Transferred from:http://blog.sina.com.cn/s/blog_4ed32a400100tcr3.html
The implementation functions are as follows
function Getbrowser (n) {
var ua = navigator.userAgent.toLowerCase (),
S
name = ' ',
ver = 0;
Probe browser
(s = ua.match (/msie ([\d.]+)/))? _set ("ie", _tofixedversion (S[1])):
(s = ua.match (/firefox\/([\d.]+)/))? _set ("Firefox", _tofixedversion (s[1)):
(s = ua.match (/chrome\/([\d.]+)/))? _set ("Chrome", _tofi
This thing is useful in cross-platform front-end development:Judging the type of browser in JS, it is estimated that every developer who has edited the page has encountered a problem. In many browser products, IE, Firefox, Opera, Safari ... Many brands are standard, so it is often necessary to use different browsers and even different versions of the same
the Aalink word in the attribute
[attribute|=value] is used to select an element with an attribute value that begins with the specified value, which must be the entire word. [title|= "AA"] selects all elements with the title attribute beginning with AA or aa-
[attribute^=value] matches the property value to specify each element at the beginning of the value. [title^= "AA"] selects all elements with the title attribute beginning with AA
[attribute$=value] matches the property value t
The lowercase information of the UserAgent property of the Navigator object is obtained first, and then the assignment is evaluated according to the regular expression.var Sys = {};var ua = Navigator.userAgent.toLowerCase (); var s;var scan; (s = Ua.match (/msie ([\d.] +)/)) ? sys.ie = S[1]: (s = Ua.match (/firefox\/([\d.] +)/)) ? Sys.firefox = S[1]: (s = Ua.match (/chrome\/([\d.] +)/)) ? Sys.chrome = S[1]: (s = Ua.match (/opera. ( [\d.] +)/)) ? Sys.o
The lowercase information for the UserAgent property of the Navigator object is obtained first, and then the value is inferred from the regular table.var Sys = {};var ua = Navigator.userAgent.toLowerCase (); var s;var scan; (s = Ua.match (/msie ([\d.] +)/)) ? sys.ie = S[1]: (s = Ua.match (/firefox\/([\d.] +)/)) ? Sys.firefox = S[1]: (s = Ua.match (/chrome\/([\d.] +)/)) ? Sys.chrome = S[1]: (s = Ua.match (/opera. ( [\d.] +)/)) ? Sys.opera = S[1]: (s =
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.