日期:2014-05-17 浏览次数:20544 次
<script type="text/javascript">
function Creat() {
var textBoxId = document.createElement("input");
textBoxId.nodeType = "text";
textBoxId.nodeName = "textBoxId1";
document.getElementById("GoodsBox").appendChild(textBoxId);
}
</script>
<div>
<form action="Default2.aspx" method="post" id="GoodsBox">
<input type="submit" value="提交" />
</form>
<input type="button" onclick="Creat()" value="创建" />
</div>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script type="text/javascript">
function Creat() {
var textBoxId = document.createElement("input");
textBoxId.setAttribute("type", "text");
textBoxId.setAttribute("id", "textBoxId1");
document.getElementById("GoodsBox").appendChild(textBoxId);
}