JSはウェブページの属性を獲得して幅、高さなどを含みます.

1522 ワード

 
  
function getInfo()
{
var s = "";
s += " :"+ document.body.clientWidth+" ";
s += " :"+ document.body.clientHeight+" ";
s += " :"+ document.body.offsetWidth + " ( )"+" ";
s += " :"+ document.body.offsetHeight + " ( )"+" ";
s += " :"+ document.body.scrollWidth+" ";
s += " :"+ document.body.scrollHeight+" ";
s += " (ff):"+ document.body.scrollTop+" ";
s += " (ie):"+ document.documentElement.scrollTop+" ";
s += " :"+ document.body.scrollLeft+" ";
s += " :"+ window.screenTop+" ";
s += " :"+ window.screenLeft+" ";
s += " :"+ window.screen.height+" ";
s += " :"+ window.screen.width+" ";
s += " :"+ window.screen.availHeight+" ";
s += " :"+ window.screen.availWidth+" ";
s += " "+ window.screen.colorDepth +" "+" ";
s += " "+ window.screen.deviceXDPI +" / "+" ";
s += " window (ff) "+window.innerHeight+" ";
alert (s);
};