用innerHTML向网页中插入<form>dd</form>不显示
例如;<headid="Head1"runat="server"><title></title><scripttype="text/javascript">functio...
例如;<head id="Head1" runat="server">
<title></title>
<script type="text/javascript">
function aa() {
document.getElementById("id").innerHTML = "<form>safdsa</form>";
}
</script>
</head>
<body onload="aa()">
<form id="form2" runat="server">
<div id="id">
</div>
</form>
</body>
运行页面后什么也不显示,请问什么原因?如何让他显示出来? 展开
<title></title>
<script type="text/javascript">
function aa() {
document.getElementById("id").innerHTML = "<form>safdsa</form>";
}
</script>
</head>
<body onload="aa()">
<form id="form2" runat="server">
<div id="id">
</div>
</form>
</body>
运行页面后什么也不显示,请问什么原因?如何让他显示出来? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询