js 哪里出错 为什么document.getElementById("time").value = a; 不能成功?
<html><head><scripttype="text/javascript">functionpage_onload(){vara=document.getElem...
<html>
<head>
<script type="text/javascript">
function page_onload(){
var a= document.getElementById("1").value;
document.getElementById("time").value = a;
}
</script>
</head>
<body onload="page_onload()">
<span id='1'>123123</span>
<input id="time" name="" type="text" value="" />
</body>
</html> 展开
<head>
<script type="text/javascript">
function page_onload(){
var a= document.getElementById("1").value;
document.getElementById("time").value = a;
}
</script>
</head>
<body onload="page_onload()">
<span id='1'>123123</span>
<input id="time" name="" type="text" value="" />
</body>
</html> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询