window properties of the object:
The width of the visible region: window.innerWidth || document.documentElement.clientWidth ( compatible IE) || document.body.clientWidth
The width of the visible region: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
Distance from the top of the page scroll bar: document.documentElement.scrollTop || document.body.scrollTop
Distance from the left side of the page scroll bar: document.docimentElement.scrollLeft || document.body.scroll Left
event Compatible: var = Eve event the window.event ||
( Keyboard events ) var keyC = eve.keyCode (IE) || eve.which
Prevent the event from bubbling function package:
function del(){
var e = event || window.event;
if (e.stopPropagation) {// common way to prevent bubbling behavior
e.stopPropagation();
} Else {// IE browser
event.cancelBubble = true;
}
Prevent the default behavior of the function package :
function stopDefault(event) {
var e = event || window.event;
if (e.preventDefault){
e.preventDefault (); // standard browser
}else{
e.returnValue = false; // IE browser
}
}
DOM2 -level events package:
function addEvent(obj,inci,back){
if(obj.addEventListener){
obj.addEventListener(inci,back);
}else if(obj.attachEvent){
obj.attachEvent("on" + inci,back);
} else {// above do not support the binding DOM1 level events
obj["on"+inci] = back;
}
}
Event Source target acquisition compatible with the wording :
var e = eve || window.event;
var target = e.target || e.srcElement;
Non-line-style get:
Node object .currentStyle [ Properties ] IEs browser
the getComputedStyle ( node objects ). Properties Non- IE browser. Get property value of the property.