functiongetclientheight () {//Visible High varClientheight=document.body.clientheight;//other Browser default values if(Navigator.userAgent.indexOf ("MSIE 6.0")!=-1) {clientheight=Document.body.clientHeight; } Else if(Navigator.userAgent.indexOf ("MSIE")!=-1) { //IE7 IE8clientheight=Document.documentElement.offsetHeight}if(Navigator.userAgent.indexOf ("Chrome")!=-1) {clientheight=Document.body.scrollHeight; } if(Navigator.userAgent.indexOf ("Firefox")!=-1) {clientheight=Document.documentElement.scrollHeight; } returnclientheight;}//get web content heightfunctiongetcontentheight () {//Visible High varContentheight=document.body.scrollheight;//other Browser default values if(Navigator.userAgent.indexOf ("Chrome")!=-1) {Contentheight=Document.body.clientHeight; } if(Navigator.userAgent.indexOf ("Firefox")!=-1) {Contentheight=Document.body.offsetHeight; } returncontentheight;}
JS get Web content height and Web visual height support IE 6789 Firefox Chrome "Turn"