JavaScriptÔõÑùд¹È¸èÊ×Ò³µÄ¡°¸ü¶à¡±
http://www.google.cn/
ÖеÄÄǸö¸ü¶àÓÃJavaScriptÔõôʵÏÖ?²»ÒªÓÃjQ.
HTML code:
<script type="text/javascript">
function showMenu(e) {
document.getElementById("subMenu").style.display = "block";
//·ÀֹʼþðÅÝ
if (e && e.stopPropagation)
e.stopPropagation();
else
window.event.cancelBubble = true;
return false;
}
document.onclick = function() {
if (document.getElementById("subMenu").style.display = "block") {
document.getElementById("subMenu").style.display = "none";
}
}
</script>
<a href="javascript:void(0);" onclick="showMenu(event)">¸ü¶à</a>
<div id="subMenu" style="position: absolute; display: none; border: 1px solid #ccc;">
<p>
<a href="#" onclick="alert(1)">menu1</a></p>
<p>
menu2</p>
</div>
·Ç³£¸Ðл£¬ÄÜ˵˵//·ÀֹðÅÝʼþµÄ×÷ÓÃÂð£¿
ʵÔÚÊÇ̫ǿÁË£¬Ð»Ð»£¡
²»·ÅÖÃðÅݵϰ¡£µã»÷¸ü¶à£¬ÏÈÕ¹¿ª£¬ÓÖÒòΪdocument.onclick¶ø¹Ø±ÕÁË¡£
1¥ǿ°¡¡£¡£Õæ¿ì
¶¥
Ïà¹ØÎÊ´ð£º
ÈçϵĿò¼Ü¶¨Ò壺
<frameset cols="100,*">
<frame name="left" src="a.html">
<frameset rows="80,*">
......
ÎÒÐèҪдһ¶Î´úÂëÀ´¶ÁȡijÎļþ¼ÐϵÄÎļþ£¬Ö»ÐèÒª¶ÁÈ¡µ½Îļþ¼ÐÏÂËùÓÐÎļþÃû¾ÍºÃÁË£¡£¡£¡
Çó´úÂëÏÈ£¡£¡ÎÒ¶¼²»»á£¬ËùÒÔÒª´úÂëÁË¡£
¿Í»§¶ËµÄÎļþ£¬²»ÄÜÕâô×ö¡£
ÈçÃÏ×ÓËù˵£¬ÔÚ¿Í»§¶ËµÄJavaScriptÖÐÔËÐÐÎļþ ......
ÔÚÒ»¸ö¶Ô»°¿òÄÚ°üº¬ä¯ÀÀÆ÷¿Ø¼þµÄ³ÌÐòÖУ¬ÏëÈÃJavaScriptÒ³Ãæµ÷ÓÃc++Äڵĺ¯Êý£¬ÇëÎÊÔõô½«º¯Êý±©Â¶¸øJavaScript
¶øJavaScriptÓÖ¸ÃÈçºÎµ÷ÓÃÕâ¸öº¯ÊýÄØ£¿
Ï£Íû²ûÊöµÄÔ½¼òµ¥Ô½Ã÷°×Ô½ºÃ£¬×îºÃÄÜÓôúÂë˵Ã÷£ ......
ÎÒ¶ÔÊ÷½øÐа󶨵Äʱºò£¬Óиø Ê÷µÄtitle ÊýÖµ£¡
ÎÒÔËÐÐÆðÀ´£¬£¬£¬Êó±ê·Åµ½½ÚµãÉÏ£¬Ò²Õý³£ÏÔʾ title Öµ
ÔËÐкóÉú²úµÄHTNL ´úÂ룺
ÆäÖеÄÒ»¸ö½ÚµãHTML
<tr>
<td> <a id="Data ......