备用~

DATE: 2016-11-10 / VIEWS: 639

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>练习</title>
<style type="text/css">
body{margin:0px;}
#qq{background:#cccccc;font-size:12px;line-height:180%;}
</style>
<script>
function show(){
var myHeight = document.documentElement.clientHeight;
alert(myHeight);
document.getElementById("qq").style.height = myHeight;
document.getElementById("qq").style.background="red";
document.getElementById("qq").style.color ="#ffffff";
document.getElementById("qq").innerHTML="加载完毕!";
}
</script>
</head>

<body onload="show()">
<div id="qq">加载中...</div>
</body>
</html>