//css float
document.getElementById("header").style.styleFloat = "left"; //ie
document.getElementById("header").style.cssFloat = "left"; //Firefox
//获取IE下鼠标的位置
var myCursorPosition = [0, 0];
myCursorPosition[0] = event.clientX;
myCursorPosition[1] = event.clientY;
//获取FF下鼠标的位置
var myCursorPosition = [0, 0];
myCursorPosition[0] = event.pageX;
myCursorPosition[1] = event.pageY;
/*********************************************************************/
//获取可见区域、窗口的大小IEvar myBrowserSize = [0, 0]; myBrowserSize[0] = document.documentElement.clientWidth; myBrowserSize[1] = document.documentElement.clientHeight; //FFvar myBrowserSize = [0, 0]; myBrowserSize[0]
= window.innerWidth; myBrowserSize[1] = window.innerHeight; /*********************************************************************/
//下面这个应该是CSS的在IE中这样写: #myElement { filter: alpha(opacity=50); } var myObject = document.getElementById("myElement"); myObject.style.filter = "alpha(opacity=80)"; 在Firefox中这样写: #myElement
{ opacity: 0.5; } var myObject = document.getElementById("myElement"); myObject.style.opacity = "0.5";