Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScript ¶à¼¶²Ëµ¥

 ÊµÏÖЧ¹û£º
ÒýÈëJSºÍCSSÎļþ£º
<mce:script type='text/javascript' src="dropdown/jquery-1.2.3.min.js" mce_src="dropdown/jquery-1.2.3.min.js"></mce:script>
<mce:script type='text/javascript' src="dropdown/menu.js" mce_src="dropdown/menu.js"></mce:script>
<link rel="stylesheet" href="dropdown/style.css" mce_href="dropdown/style.css" type="text/css" media="screen" />
style.css Code:
body{
font-size:0.85em;
font-family:Verdana, Arial, Helvetica, sans-serif;
}
#div{
line-height:1.5em;
list-style-type: none;
width: 300px;
margin-right: auto;
margin-left: auto;
}
#nav, #nav ul{
margin:0;
padding:0;
list-style-type:none;
list-style-position:outside;
position:relative;
line-height:1.5em;
}
#nav a{
display:block;
padding:0px 5px;
border:1px solid #333;
color:#fff;
text-decoration:none;
background-color:#333;
}
#nav a:hover{
background-color:#fff;
color:#333;
}
#nav li{
float:left;
position:relative;
}
#nav ul {
position:absolute;
display:none;
width:3em;
top:1.5em;
}
#nav li ul a{
width:10em; /*¿ØÖƸ¸²Ëµ¥µ¯³ö²Ëµ¥¿í¶È*/
height:auto;
float:left;
}
#nav ul ul{
top:auto;
}
#nav li ul ul {
left:10em;
margin:0px 0 0 10px;
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul{
display:none;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul{
display:block;
}
menu.js Code:
function mainmenu(){
$(" #nav ul ").css({display: "none"}); // Opera Fix
$(" #nav li").hover(function(){
$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
},function(){
$(this).find('ul:first').css({visibility: "hidden"});
});
}

$(document).ready(function(){
mainmenu();
});
<div id="div">
<ul id="nav" >
<li><a href="#" mce_href="#">ASP.NET</a>
<ul>
<li><a href="#" mce_href="#">ASP.NET AJAX</a></l


Ïà¹ØÎĵµ£º

¼«¾­µäµÄJavaScript¿ò¼Üprototype.jsÖÐʵÏּ̳еķ½·¨

 ±¾ÎÄ·ÇÔ­´´
   
Object.extend = function(destination, source) {
for (var property in source) {
    destination[property] = source[property];
}
return destination;
}
Prototype ¶ÔObjectÀའ......

³£ÓÃJavaScriptÅжÏ×Ö·û´®µÄһЩ´úÂë

 //ÅжÏÊäÈëÄÚÈÝÊÇ·ñΪ¿Õ
function IsNull(){
var str = document.getElementById('str').value.trim();
if(str.length==0){
alert('¶Ô²»Æð£¬Îı¾¿ò²»ÄÜΪ¿Õ»òÕßΪ¿Õ¸ñ!');//Ç뽫“Îı¾¿ò”¸Ä³ÉÄãÐèÒªÑéÖ¤µÄÊôÐÔÃû³Æ!
}
}

//ÅжÏÈÕÆÚÀàÐÍÊÇ·ñÎ ......

javascript»ñÈ¡selectµÄֵȫ½â

»ñÈ¡ÏÔʾµÄºº×Ö
document.getElementById("bigclass").options[window.document.getElementById("bigclass").selectedIndex].text
»ñÈ¡Êý¾Ý¿âÖеÄid
window.document.getElementById("bigclass").value
»ñÈ¡select×é·ÖÅäµÄË÷Òýid
window.document.getElementById("bigclass").selectedIndex
Àý×Ó£º
<select name= ......

¡ü¡ú40ÖÖÍøÒ³³£ÓÃС¼¼ÇÉ(javascript)¡û¡ý

 1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡Ïûѡȡ¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ