1. Understand Navigator objects
Navigator: get information about the browser. all browsers support Navigator objects and are read-only.
Ii. attributes of the Navigator object
-- The following reference:
The Navigator property of the Window object refers to the Navigator object that contains the browser manufacturer and version information. The Navigator object was named to commemorate the Netscape after Navigatorbu 2, but all other browsers also
The Navigator object, which was first introduced by Netscape Navigator 2.0, has now become the de facto standard for identifying client browsers. While other browsers provide the same or similar information by other means (for example,
1. Firefox cannot support innertext.Firefox supports innerhtml but does not support innertext. It supports textcontent to implement innertext, but by default, redundant spaces are retained. If textcontent is not required, you can use innerhtml
Compatibility between IE and Firefox
From: http://blog.csdn.net/powerglover/archive/2009/01/15/3789631.aspx
1. Event ProblemsIn IE, we can directly use the event variable, but in Firefox, because the event is a local variable, in Firefox, We can
1. Document. Form. Item Problems
Problem:
ExistingCodeThere are many statements such as document. formname. Item ("itemname") and cannot be run in Firefox.
Solution:
Use document. formname. elements ["elementname"]
2. Collection class
1. Firefox cannot support innertext.Firefox supports innerhtml but does not support innertext. It supports textcontent to implement innertext, but by default, redundant spaces are retained. If textcontent is not required, you can use innerhtml
1.doc ument. formname. Item ("itemname ")
Description: You can use document. formname. item ("itemname") or document. formname. elements ["elementname"]; In Firefox, only document. formname. elements ["elementname"].Solution: Use document. formname.
Detailed description of window. navigator in javascript Host object, javascriptnavigator
Window. navigator is an object that reflects the information about the browser and its functions.
// Check the browser version information function
"Summary" when doing an internationalized Web project, I encountered a problem of switching the default language version according to the natural language used by the user's browser. So, organized this article. First , W3cschool about navigator The
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.