iLoveMyD
html
<div id="org"></div> //注意:id不能写在button上,js获取不到button的id(可能是我们公司的框架的原因)
<input type="button" onclick="add1();" value="添加" />
script <script type="text/javascript"> function add1(){ var input1 = document.createElement(\'input\'); input1.setAttribute(\'type\', \'text\'); input1.setAttribute(\'name\', \'organizers[]\'); input1.setAttribute(\'class\', \'git\'); var btn1 = document.getElementById("org"); btn1.insertBefore(input1,null); } </script>

 

推荐一个PHP框架: SummerPHP

分类:

技术点:

相关文章:

  • 2022-01-22
  • 2021-07-21
  • 2022-12-23
  • 2021-09-22
  • 2022-01-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-08
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
相关资源
相似解决方案