Alibabacloud.com offers a wide variety of articles about opera browser old version, easily find your opera browser old version information here online.
You can directly use HTTP_USER_AGENT to obtain the browser version in php, but you need to determine which version is the browser. the instance code is as follows: functionget_user_ B... you can directly use HTTP_USER_AGENT to obtain the browser
Especially in today's various browsers are flying (it is said that only IE is the kernel of the browser there are 200 kinds of).
Little brother today wrote a jquery based plug-in extension that identifies the type and version of the browser's kernel and shell. can identify the various browsers of the kernel, and has supported a variety of domestic mainstream browsers.
Crap not much to say, on my JavaScript
So let's take a look at the user-agent of the following four major browsers:
Safari (Windows Edition)
... applewebkit/523.12.9 (khtml, like Gecko) version/3.0 safari/523.12.9Opera (opera 9.2 on Windows XP)
opera/9.24 (Windows NT 5.1; U ZH-CN)Mozilla (Firefox 2.0.11 on Windows XP)
... Windows NT 5.1; ZH-CN; rv:1.8.1.11) gecko/20071127 firefox/2.0.0.11Internet
JQuery uses the method Jquery.browser to determine the browser, the return value can be: Safari opera msie Mozilla.Of course, there are times when we need to differentiate between versions. jQuery.browser.versionfunction Judgebroswer () {if($.browser.msie) {alert ("This is msie!");//IE } Else if($.browser.safari) {alert ("This is safari!");//Safari } Else if($.browser.mozilla)
This article describes how to obtain the user's browser version by using php. you can use $ _ SERVER [this article describes how to obtain the user's browser version by using php. Share it with you for your reference. The specific analysis is as follows:
In php, we have a global variable $ _ SERVER ['http _ USER_AGENT
This article describes how to obtain the user's browser version in php. it is very useful to use $ _ SERVER [HTTP_USER_AGENT] to obtain user information, for more information about how to obtain the user's browser version, see the example in this article. Share it with you for your reference. The specific analysis is a
Data Record: Judging the browser type in JS is probably a problem that every developer who edited the page has encountered. Among the many browser products, many brands of IE, Firefox, Opera, and Safari have different standards. Therefore, you often need to record them based on different browsers or even the same license information: judging the
1, in the web development, will often let you determine the current use of the browser and browser that version, according to the browser version to adjust the style of CSS,
To make the Web interface work best for each browser, h
Today's Internet, the browser can be said to be too much, but most of the shell is not hearts, basically the mainstream browser or Firefox, Google, Ie,safrai these several relatively common, so in our development, Sometimes you need to find out what browsers you're using and what version you're using, and give certain hints based on the return value, and I'll sim
1, in web development, will often let you infer that the current use of the browser and browser version number, according to the browser version number to adjust the style of CSS,So that the Web interface in each browser to achiev
1, in the web development, will often let you judge the current use of the browser and the browser version, according to the browser version to adjust the style of CSS,So that the Web interface in each browser to achieve the best
$ (Document). Ready ( Function (){ VaR Bro = $. browser; VaR Binfo = ""; If (Bro. MSIE) {binfo = "Microsoft Internet Explorer" + bro. version ;} If (Bro. Mozilla) {binfo = "Mozilla Firefox" + bro. version ;} If (Bro. Safari) {binfo = "Apple Safari" + bro. version ;} If (Bro. Opera
This article mainly introduces how to obtain the type and version of a browser using javascript (js to obtain the browser version). For more information, seeThe Code is as follows: function getjavaserinfo () {var explorer = window. navigator. userAgent. toLowerCase (); // ie if (explorer. indexOf ("msie")> = 0) {var ve
These two days to make a judgment of the browser type and version number of the business, record the relevant JS code:
Copy Code code as follows:
function Allinfo () {
var ua = navigator.useragent;
UA = Ua.tolowercase ();
var match =/(WebKit) [\/] ([\w.] +)/.exec (UA) | |
/(opera) (?:. *version)? [ \
// A piece of code that can determine the browser type and version
Window ["MzBrowser"] ={}; (function ()
{
If (MzBrowser. platform) return;
Var ua = window. navigator. userAgent;
MzBrowser. platform = window. navigator. platform;
MzBrowser. firefox = ua. indexOf ("Firefox")> 0;MzBrowser. opera = typeof (window. opera
The code is as follows
Copy Code
Rwebkit =/(WebKit) [/] ([w.] +)/,//webkitRopera =/(opera) (?:. *version)? [ /] ([W.] +)/,//operaRmsie =/(MSIE) ([w.] +)/,//ieRmozilla =/(Mozilla) (?:. *? RV: ([w.] +))?/,//mozilla
With useragent, we can see that chrome can be matched in the following ways, but as with Safari, it has
"Safari," we can put it in the Rwebkit. Match before
In front-end development, you often need to determine the browser version to ensure compatibility with multiple browsers at the same time. Below are two good common methods: Comments in jquery and HTML, if you like it, you can refer to the following methods to search for browsers and versions on the Internet. Here, the younger brother sums up two methods to save your time.
1. jquery method:
Regular Expr
use jquery to determine the browser type: Determine whether the browser type is IE browser or Firefox or even opera or Apple browser Safari,jquery effect code is as follows: Determine the browser type and
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.