日期:2014-05-19 浏览次数:20729 次
var TemO=document.getElementById("add");
var newInput = document.createElement("input");
newInput.id="input"+(elementCount);
newInput.name="textfield";
TemO.appendChild(newInput);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title></title>
<script type="text/javascript" language="javascript">
function test()
{
var elementCount=1;
var Tem=document.getElementById("add");
var newInput = document.createElement("input");
newInput.id="input"+(elementCount);
newInput.name="textfield";
Tem.appendChild(newInput);
}
</script>
</head>
<body onload ="test();">
<form id ="add" action="localhost:8080/client/transferConfirm.do" method="post">
<input type="hidden" name="flag" value="querytransferdetail"/>
<input type="submit" name="submit" value="提交"/>
</form>
</body>
</html>