<!DOCTYPE html>
<html>
<head>
<title>练习</title>
<meta charset="utf-8">
</head>
<body style="text-align: center; margin: 0px;">
<iframe src="http://www.taobao.com" frameborder="0" width="100%" height="h"></iframe>
<button onclick="winheight()" style="padding: 15px; margin-top: 150px;">点击测试是否有效</button>
<script type="text/javascript">
function winheight(h){
var h=document.documentElement.clientHeight;
alert("高是:" + h);
}
</script>
</body>
</html>
添加回答
举报
0/150
提交
取消