q1ng

<html>
<head>
<script language="javascript">
var i=0;
function addinput(){
    i++;
    document.getElementById("d").innerHTML+="<input type=\'text\' id="+i+" />";
}
</script>
</head>

<body>
<button onclick="addinput()">增加文本框</button>
<button onclick="addtext()">相加</button>
<div id="d"></div>
</body>
</html>

 

分类:

技术点:

相关文章:

  • 2021-04-02
  • 2021-11-01
  • 2021-08-02
  • 2021-08-08
  • 2021-12-20
  • 2021-08-02
  • 2021-08-02
猜你喜欢
  • 2021-08-03
  • 2021-10-08
  • 2021-08-03
  • 2021-12-29
  • 2021-11-23
  • 2021-09-08
  • 2021-10-19
相关资源
相似解决方案