Home > Article > Web Front-end > Summary of quirks of different browsers_javascript tips
1. When setting the div top and left, they must be set together, otherwise the object will disappear, and the description layer postion is set to fixed
document.getElementById("mydiv").style.top=10 "px";
document.getElementById("mydiv").style.left=10 "px";
There is no such problem when tested under chrome
2. Get the page The height and width of the part being viewed.
IE8 can only use document.documentElement.Height/Width
Chrome can use window.innerHeight/innerEidth or the above
3. Mouse pointer
You can customize the mouse pointer under IE and add url, cursor:url("move.cur");
You need to add it at the end under chrome on, autocursor:url("move.cur"),auto;
4.javascript address bar dynamic output (when opening any web page, enter javascript:void( (function(){ })())) execute a piece of code)
For example, if you want to output a layer and write document.write directly, nothing will be displayed
You can only use var obj=document .createElement("div");
obj.style set one by one