function AddElement(mytype){ var mytype,TemO=document.getElementById("add"); var newInput = document.createElement("input"); newInput.type=mytype; newInput.name="input1"; TemO.appendChild(newInput); var newline= document.createElement("br");//创建一个BR标签是为能够换行! TemO.appendChild(newline); } script>