브 라 우 저 창 조정

1875 단어 html브 라 우 저


 <html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>        </title> <meta http-equiv="content-type" content="text/html; charset=utf-8">
</meta></head>
<body>
<h2 align="center">          </h2><hr />
<form action="#" method="get" name="form1" id="form1">
<!--            -->
            : <input type="text" name="availHeight" size="4"/><br />
            : <input type="text" name="availWidth" size="4"/><br />
</form>
<script type="text/javascript">
<!-- 
var winWidth = 0;
var winHeight = 0;
function findDimensions() //  :    
{
//      
if (window.innerWidth)
winWidth = window.innerWidth;
else if ((document.body) && (document.body.clientWidth))
winWidth = document.body.clientWidth;
//      
if (window.innerHeight)
winHeight = window.innerHeight;
else if ((document.body) && (document.body.clientHeight))
winHeight = document.body.clientHeight;
//    Document   body    ,      
if (document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth)
{
winHeight = document.documentElement.clientHeight;
winWidth = document.documentElement.clientWidth;
}
//          
document.form1.availHeight.value= winHeight;
document.form1.availWidth.value= winWidth;
}
findDimensions();
//    ,    
window.onresize=findDimensions;

//-->
</script>
</body>
</html>

좋은 웹페이지 즐겨찾기