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¥ǿ°¡¡£¡£Õæ¿ì
¶¥
Ïà¹ØÎÊ´ð£º
<form id="form1" runat="server">
<div>
<script type="text/javascript">
function oo(a){
document.getEleme ......
Çë½Ì....
°ÑJavaScriptÖ±½ÓдÔÚjspÒ³ÃæÖØµ÷ÓñȽϺÃÄØ »¹ÊǰÑJavaScriptд³É.jsÎļþ È»ºóÔÚjspÒ³ÃæÖе÷Óà ºÃÄØ
ÎªÊ²Ã´ÄØ
¸öÈ˾õµÃµ÷ÓñȽϺᣡ£¡£
°ÑJavaScriptд³É.jsÎļþ ÕâÑù±È½ÏºÃ~ ......
Ê÷HTML
<div id="DataTreeView" class="dtree" onclick="treeview_click(this);">
<Table> Õ¹¿ª OR ÕÛµþ </Table>
<DIV> ......
ÔÚÒ»¸ö¶Ô»°¿òÄÚ°üº¬ä¯ÀÀÆ÷¿Ø¼þµÄ³ÌÐòÖУ¬ÏëÈÃJavaScriptÒ³Ãæµ÷ÓÃc++Äڵĺ¯Êý£¬ÇëÎÊÔõô½«º¯Êý±©Â¶¸øJavaScript
¶øJavaScriptÓÖ¸ÃÈçºÎµ÷ÓÃÕâ¸öº¯ÊýÄØ£¿
Ï£Íû²ûÊöµÄÔ½¼òµ¥Ô½Ã÷°×Ô½ºÃ£¬×îºÃÄÜÓôúÂë˵Ã÷£ ......