<script type="text/javascript">
var getScreen = function (name) {
var elem = document;
return Math.max( elem.documentElement["client" + name], elem.body["scroll" + name], elem.documentElement["scroll" + name], elem.body["offset" + name], elem.documentElement["offset" + name] ) ;
}
var gIsSmall = false;
alert(getScreen(‘Width‘)) ;
alert(getScreen(‘Height‘)) ;
</script>
时间: 2024-11-08 06:57:45