通过监听父级容器下匹配子元素进行事件绑定
<div id="test1"><input type="button" class="btn" value="按钮1"/><input type="button" class="btn" value="按钮1"/><input type="button" class="btn" value="按钮1"/><p></p></div><input type="button" class="add" value="加一个按钮" /><script type="text/javascript" src="js/jquery-1.10.2.min.js"></script><script type="application/javascript">
$(function(){
$('#test1').on('click','.btn',function(){
alert('绑定有效1')
});
$('.add').on('click',function(){
$('#test1').append('<input type="button" class="btn" value="按钮2"/>')
});
})
</script>
$('.add').on('click',function(){
$('#test1').append('<input type="button" class="btn" value="按钮2"/>');
$('.btn').on('click',function(){});
});