35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
html "<INPUT TYPE='HIDDEN' id='winHigh' name='winHigh' VALUE='";winHigh;"'></input>"
|
|
html "<INPUT TYPE='HIDDEN' id='winWide' name='winWide' VALUE='";winWide;"'></input>"
|
|
|
|
html "<script>
|
|
<!--
|
|
|
|
function winSize()
|
|
{
|
|
var myWide = 0, myHigh = 0;
|
|
if( typeof( window.innerWidth ) == 'number' ) {
|
|
//Non-IE
|
|
myWide = window.innerWidth;
|
|
myHigh = window.innerHeight;
|
|
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
|
|
//IE 6+ in 'standards compliant mode'
|
|
myWide = document.documentElement.clientWidth;
|
|
myHigh = document.documentElement.clientHeight;
|
|
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
|
|
//IE 4 compatible
|
|
myWide = document.body.clientWidth;
|
|
myHigh = document.body.clientHeight;
|
|
}
|
|
// window.alert( 'Width = ' + myWide + ' Height = ' + myHigh );
|
|
document.getElementById('winHigh').value = myHigh;
|
|
document.getElementById('winWide').value = myWide;
|
|
}
|
|
|
|
window.onresize = function()
|
|
{
|
|
var x = winSize();
|
|
}
|
|
var x = winSize();
|
|
//--></script>
|
|
"
|