The most basic syntax for accessing a given CSS value is: Object.style.property, such as: Object.style.backgroundcolor= "#ccc"; However, if you access the Float property, it is not the same, because float itself is the reserved keyword JS, you need to write this:
IE:object.style.styleFloat = "Left";
FF:object.style.cssFloat = "Left";
Class is also a reserved keyword, which can be written like this:
IE:object.getAttribute ("ClassName");
FF:object.getAttribute ("class");
Window.event Object Differences
IE: There are window.event objects
FF: No Window.event object. You can pass an event object to a parameter of a function. such as Onmousemove=domousemove (event)
Get the current coordinates of the mouse
Ie:event.x and Event.y.
FF:event.pageX and Event.pagey.
General: Both have Event.clientx and Event.clienty attributes.
The current coordinates of the mouse (plus the distance the scroll bar rolls over)
IE:event.offsetX and Event.offsety.
FF:event.layerX and Event.layery.
Coordinates of the x and Y of the label: Style.posleft and Style.postop
IE: there is.
FF: No.
General: Object.offsetleft and Object.offsettop.
Get the height and width of a form
IE:document.body.offsetWidth and Document.body.offsetHeight. (the page must have a body tag)
FF:window.innerWidth and Window.innerhegiht, as well as Document.documentElement.clientWidth and document.documentElement.clientHeight.
General: Document.body.clientWidth and Document.body.clientHeight.