JS读取不到控件值的原因?
html>
<head>
<title></title>
<script>
window.onload=function(){
Loaddata();//本函数中修改了test.innerhtml 以及Page控件的value值
alert(document.getElementById("Page").value);//显示Page控件的value值
};
</script>
</head>
<body>
<div id="test"></div>
<input type="hidden" id="Page"/>
</body>
</html>
问题: 为什么alert弹出的值一直是空的?而且,只有我先点击了alert的窗口的确定按钮以后,test.innerhtml的内容才加载?