jquery注册click事件无效
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <script type="text/javascript" src="jquery.js"></script> <BODY> <div id="aaaaa" style="border:1px solid;background:red;z-index:20" > <input type="button" id="ccccc" value="ccccc" onclick=""/></div> <div id="bbbbb" style="border:2px solid;width:500;height:200;"></div><script type="text/javascript"> $(document).ready(function() {$("#ccccc").click(function() {alert(1);});$("#bbbbb").html($("#aaaaa").html());//此时之前注册的click事件无效(移动过后的按钮 相当于此时页面有两个id为ccccc的按钮 而第二个按钮的注册的click事件无效) }); </script> </BODY></HTML>