jquery ÔõÑùÈ¡µÃhtml£¬loadºóµÄ¶ÔÏó£¿
ÎÒÓÃ$("#b").html( <a id="a">²âÊÔ </a>)¼ÓÔØºó
$("#a").click() ÕÒ²»µ½Õâ¸ö¶ÔÏó
Ôõô°ì°¡
×Ô¼ºÏȶ¥ÏÂ
µÈ´ý
°¥Ã»È˻شð
ÄãÊÇÕÒ²»µ½¶ÔÏó»¹ÊÇÕÒ²»µ½Õâ¸öʼþ£¿Äã¸ãÇå³þÁËô£¿Ã»Óж¨ÒåclickÕâ¸öʼþ£¿
û¶¨ÒåclickÒ²²»»á±¨´í,
ÕÒ²»µ½¶ÔÏóÖ¸$("#a")Ϊ¿Õ
Ŷ лл ºÇºÇ ÎÒÒ²ÊǸÕѧÕâ¸ö jQuery
ÉÏ´úÂë....²»È»ËµÁËÒ²°×˵....
ÖªµÀÁË£¬ÊÇjsÖ´ÐÐÒ²ÓÐ˳ÐòµÄÔÒò
<script>
$(document).ready(function() {
$("#b").html( ' <a id="a">²âÊÔ </a>');
});
$(document).ready(function() {
$("#a").click(function() {
alert("a");
});
});
</script>
<div id="b">
</div>
ÕâÑùÄÜÖ´ÐÐ
<script>
$(document).ready(function() {
$("#a").click(function() {
alert("a");
});
ÎÒÓм¸Íò¸ö´ÓwordתÀ´µÄhtmlÎļþ£¬µ«ÕâЩhtmlÎļþÓÉdocµÄ100¶àK±ä³ÉÁ˼¸M£¬¼¸Ê®M¡£
ÔÀ´×ªÎªhtmlʱ²úÉúÁË´óÁ¿µÄÈßÓà´úÂ룬ÇëÎÊÓÐʲô·½·¨¿ÉÒÔÇå³ýÕâЩÀ¬»ø¡£
ÐèÒª³ÌÐò´úÂë¡£
¸Õ²Åû·ÖÁË£¬ÏÖÔÚÓÖÓÐÁË£ ......