81,122
社区成员




<body>
<input id = 'numId' type="text"/>
<button onclick="test()">test</button>
<script>
function test(){
var num = document.getElementById("numId").value;
for(i=0;i<num;i++){
var b = document.getElementsByTagName("body");
var input = document.createElement("input");
var br = document.createElement("br");
b[0].appendChild(br);
b[0].appendChild(input);
}
}
</script>
</body>