IE |
Mozilla |
Description |
document.all (ID) |
document.getElementById (ID) |
No |
document.all |
document.getElementsByTagName ("*") |
No |
Document.body.clientHeight (clientwidth) can get an accurate value based on the DTD of the HTML. |
Window.innerheight (innerwidth) can get an accurate value based on the DTD of the HTML. |
No |
Opacity (APLHA=20) |
mozopacity= "0.2" |
Refer to my blog for this article |
Event.clienty (ClientX) |
Event.pagey (Pagex) |
No |
Event.keycode |
Event.which |
No |
Event.srcelement |
Event.target |
No |
Window.external.AddFavorite (' never-online.net ', "Never-online ' website"); |
Window.sidebar.addPanel (' never-online.net ', "Never-online ' website", ""); |
No |
Event.clienty (ClientX) |
Event.pagey (Pagex) |
No |
(DHTML event-wheel event) OnMouseWheel |
Dommousescroll |
Refer to my blog for this article
|
window.showModalDialog |
window.open (URL, "name", "Modal=yes") |
No |
Createpopup () |
Xul |
No |
HTC Controls |
XBL Binding |
No |
Filter filter |
Only Alpha (transparency, partly via clip) is supported |
No |
Obj.setcapture () |
Window.captureevents (Event.eventtype) |
No |
Obj.attachevent (type, listener) |
Obj.addeventlistener (type, listener, usecapture) |
No |
Obj.detachevent (type, listener) |
Obj.removeeventlistener (type, listener, usecapture) |
No |
Script Pre-Interpretation execution
o={ foo:function () { alert ("Never-online"); }}; with (o) { bar () ; function Bar () { alert (' Never-online '); } Foo (); }
The above code successfully outputs Never-online |
Scripts are executed sequentially. o={ foo:function () { alert ("Never-online"); }}; with (o) { bar () ; function Bar () { alert (' Never-online '); } Foo (); }
Error bar Not defined |
There are many ways to solve this, please see my comments here or this article |
Support for webdings fonts |
Webdings fonts are not supported |
No |
insertAdjacentHTML, Insertadjacentelement method |
Not supported by itself, but can be implemented by insertbefore or by range |
See the code for my article |
does not support |
Reader __definesetter (Getter) __ |
No |
does not support |
Supports prototype mode support for objects such as Element,event |
No |
does not support |
NodeType constant attribute to node |
No |
New ActiveXObject ("MSXML2. XMLHTTP ") or a later version of ProgID |
XMLHttpRequest objects |
No |
When you set a height similar to style.top=20, you do not use the unit |
When setting a height similar to style.top=20+ ' px ', you must use a unit, otherwise it is invalid |
No |
The class name of the CSS, case-insensitive (case insensitive) |
The class name of the CSS, case-sensitive (case sensitive) such as:. Mycss and. Mycss class names are different. |
No |
Bubbling event Event.cancelbubble=true |
Event.stoppropagation () (need to pass event events) |
No |
Parentelement |
Not supported by default, but can be emulated using Mozilla features
htmlelement.prototype.__definegetter__ ("Parentelement", function () {if (This.parentnode = = this.ownerdocument) return Null;return This.parentnode});
|
No |
No blank node |
Because there are 12 kinds of node properties defined under Mozilla under NodeType, we can get the expected value by removing the blank nodes.
var notspace =/\s/; function cleanwhitespace (node) {for (var x=0; x<node.childnodes.length; x + +) { var child = Node.childnodes[x ]; if ((Child.nodetype = = 3) && (!notspace.test (Child.nodevalue))) { node.removechild (node.childnodes[x)); x--; }; if (Child.nodetype = = 1) {cleanwhitespace (child);}}}
|
No |
The CSS padding width is not within offset offset coordinates |
CSS padding width By default is within offset offset coordinates, can be set with-moz-box-sizing:border-box can be basically the same as IE |
See the code for my article |
JS dynamically loads XSLT file to convert XML into Html,ie available Xmldoc.transformnode (xsldocument) method |
Mozilla is relatively troublesome, to go through several processes Xsltprocessor objects, transformtofragment or other methods |