Window. event
IE: window. event object
FF: There is no window. event object. You can pass the event object to the function parameters. For example, onmousemove = doMouseMove (event)
Current mouse Coordinate
IE: event. x and event. y.
FF: event. pageX and event. pageY.
Generic: both have the event. clientX and event. clientY attributes.
The current coordinates of the mouse (plus the scroll bar rolling distance)
IE: event. offsetX and event. offsetY.
FF: event. layerX and event. layerY.
Coordinates of tag x and y: style. posLeft and style. posTop
IE: Yes.
FF: No.
Generic: object. offsetLeft and object. offsetTop.
Height and width of the form
IE: document. body. offsetWidth and document. body. offsetHeight. Note: The page must have a body tag.
FF: always specify innerwidthand always specify innerhegihtto use document.documentelement.clientwidthand document.doc umentElement. clientHeight.
Generic: document. body. clientWidth and document. body. clientHeight.
Add event
IE: element. attachEvent ("onclick", func );.
FF: element. addEventListener ("click", func, true ).
Generic: element. onclick = func. Although the onclick event can be used, the effect of onclick is different from that of the above two methods. onclick only executes one process, while attachEvent and addEventListener execute one process list, that is, multiple processes. For example, element. attachEvent ("onclick", func1); element. attachEvent ("onclick", func2) will be executed in both func1 and func2.
Custom Attributes of tags
IE: If you define an attribute value for the label div1, you can obtain this value using div1.value and div1 ["value.
FF: you cannot use div1.value or div1 ["value.
General purpose: div1.getAttribute ("value ").
Parent node, child node, and delete node
IE: parentElement, parement. children, element. romoveNode (true ).
FF: parentNode, parentNode. childNodes, node. parentNode. removeChild (node ).