展开全部
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
function set() {
var a = document.getElementById("sss");
var d = document.createElement("br");
var c =a.cloneNode(false);
c.setAttribute("type","text");
var b = document.getElementById("body");
b.appendChild(d);
b.appendChild(c);
}
window.onload=function () {
document.getElementById("aaa").onclick=set;
}
</script>
</head>
<body id="body">
<input type="text" id="sss">
<input type="button" id="aaa" value="添加">
</body>
</html
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询