0
我制作jQuery代码时添加HTML elemnet button2当事件点击按钮1时, 并且另一个向DIV添加另一个HTML元素时点击按钮2 第一个运行但第二个不运行。如何解决这个问题呢 ?在追加按钮后调用函数
的问题实例
var button2='<input type="button" vale="add" id="idbutton2" >';
$('#idbutton1').click(function(){
$('#divid1').html(button2);
});
$('#idbutton2').click(function(){
$('#divid2').html("text");
});
的BUTTON2增加DIV,我想,当点击按钮2时运行jQuery的。
可能重复[jquery没有点击行为](http://stackoverflow.com/questions/9083768/jquery-no-behavior-on-click) – undefined