1. Firefox
Gecko is the Firefox rendering engine. The original gecko was developed as part of a generic Mozilla browser, and the first browser to use the Gecko engine was Netscape6;
We can use the user agent detection: The following JS code:
Each used UIWebView iOS developer has deep feelings about its limitations and limited functionality. Xingran, it will change the dilemma after IOS8 launched the WebKit framework. In this article I will go deep into the webkit to experience the
Detect in 360 browser Output to mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;. NET CLR trident/4.0; inf opath.2; asktbptv/5.17.0.25589; Alexa toolbar) Detect display as mozilla/5.0 (Windows NT 5.1; rv:38.0) gecko/20100101 firefox/38.
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
In an earlier article, I mentioned that boing-boing had a few issues when they wanted to use @ font-face embedding inside their website. in short, the problem was that some fonts look bad on computer monitors without font-smoothing enabled in the
Capability Testingthe ability to detect a particular browser before writing code. For example, a script might have to detect the first payment of a function before calling it. This method frees developers from considering specific browser types and
The most classic use of this is the Universal addevent function:
function addEvent(element, type, handler) {
if (element.attachEvent) { //IE8及以下浏览器
element.attachEvent('on' + type, handler);
}
else { //W3C标准浏览器
element.addEventListener(type,
Ajax| Browser
AJAX Hacks HACK1. To detect browser compatibility This section describes how to use JavaScript to establish a corresponding request object for IE or Mozilla browsers. The browsers used by the client are various. Therefore, there are
In the writing Cross-browser JS program, the detection browser is a very important work. We occasionally write branch codes for different browsers.The following is a:
Copy Code code as follows:
Add Event Tool function
function
Some js Code, spare by yourself, master do not laugh at me. (Cross-browser basic events, browser detection, and judgment of the browser name, version number, and operating system) are very practical and convenient for your use. Interested friends
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.