$(document).ready(function(){
$(document).on("click", "button", function () {
var uid = this.getAttribute('uid');
alert("lenght = " + $(this).length + "点击了按钮,uid = " + uid);
});
$(document).on("click", "img", function () {
//alert("img");
win = window.open("http://blog.csdn.net/mfcing", "", "width=200,height=200");
//OpenWindow();
});
});
<div>
<button uid="1">按钮1</button>
</div>
<p />
<div>
<button uid="2">按钮2</button>
</div>
<p />
<div>
<button uid="3">按钮3</button>
</div>