ÄÃÀ´¾ÍÄÜÓõÄJSºǫ́ÕÛµþ¹ÜÀí²Ëµ¥´úÂë
´úÂë¼ò½é£º
ºÜƯÁÁ¡¢ºÜ³£Óõĺǫ́¹ÜÀí²Ëµ¥£¬À©Õ¹ÐԺܺ㬿ÉÒÔËæÒâÀ©³ä²Ëµ¥µ¥Ôª£¬×¨ÓÃÓÚÍøÕ¾ºǫ́×ó²àµÄ¹ÜÀí²Ëµ¥¡£
´úÂëÄÚÈÝ£º
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>ÄÃÀ´¾ÍÄÜÓõÄJSºǫ́ÕÛµþ¹ÜÀí²Ëµ¥´úÂë_ÍøÒ³´úÂëÕ¾(www.webdm.cn)</title> <script type="text/javascript"> var myMenu; window.onload = function() { myMenu = new SDMenu("my_menu"); myMenu.init(); }; </script> <style type="text/css"> html,body{ height:100%; margin:0; font-size:12px; } span{ background:#F0DFBE; border:1px solid #ffffff; border-left:6px solid #F2A31B; width:166px; height:23px; display:block; line-height:23px; padding-left:20px; } a{ padding:3px 0 3px 40px; display:block; color:#636363; } #my_menu{ width:166px; background:#F7F2E4; height:100%; } div.sdmenu div.collapsed { height: 25px; } div.sdmenu div{ overflow: hidden; } </style> <script> function SDMenu(id) { if (!document.getElementById || !document.getElementsByTagName) return false; this.menu = document.getElementById(id); this.submenus = this.menu.getElementsByTagName("div"); this.remember = true; this.speed = 1; this.markCurrent = true; this.oneSmOnly = false; } SDMenu.prototype.init = function() { var mainInstance = this; for (var i = 0; i < this.submenus.length; i++) this.submenus[i].getElementsByTagName("span")[0].onclick = function() { mainInstance.toggleMenu(this[removed]); }; if (this.markCurrent) { var links = this.menu.getElementsByTagName("a"); for (var i = 0; i < links.length; i++) if (links[i].href == document.location.href) { links[i].className = "current"; break; } } if (this.remember) { var regex = new RegExp("sdmenu_" + encodeURIComponent(this.menu.id) + "=([01]+)"); var match = regex.exec([removed]); if (match) { var states = match[1].split(""); for (var i = 0; i < states.length; i++) this.submenus[i].className = (states[i] == 0 ? "collapsed" : ""); } } }; SDMenu.prototype.toggleMenu = function(submenu) { if (submenu.className == "collapsed") this.expandMenu(submenu); else this.collapseMenu(submenu); }; //htp: SDMenu.prototype.expandMenu = function(submenu) { var fullHeight = submenu.getElementsByTagName("span")[0].offsetHeight; var links = submenu.getElementsByTagName("a"); for (var i = 0; i < links.length; i++) fullHeight += links[i].offsetHeight; var moveBy = Math.round(this.speed * links.length); var mainInstance = this; var intId = setInterval(function() { var curHeight = submenu.offsetHeight; var newHeight = curHeight + moveBy; if (newHeight < fullHeight) submenu.style.height = newHeight + "px"; else { clearInterval(intId); submenu.style.height = ""; submenu.className = ""; mainInstance.memorize(); } }, 30); this.collapseOthers(submenu); }; SDMenu.prototype.collapseMenu = function(submenu) { var minHeight = submenu.getElementsByTagName("span")[0].offsetHeight; var moveBy = Math.round(this.speed * submenu.getElementsByTagName("a").length); var mainInstance = this; var intId = setInterval(function() { var curHeight = submenu.offsetHeight; var newHeight = curHeight - moveBy; if (newHeight > minHeight) submenu.style.height = newHeight + "px"; else { clearInterval(intId); submenu.style.height = ""; submenu.className = "collapsed"; mainInstance.memorize(); } }, 30); }; SDMenu.prototype.collapseOthers = function(submenu) { if (this.oneSmOnly) { for (var i = 0; i < this.submenus.length; i++) if (this.submenus[i] != submenu && this.submenus[i].className != "collapsed") this.collapseMenu(this.submenus[i]); } }; SDMenu.prototype.memorize = function() { if (this.remember) { var states = new Array(); for (var i = 0; i < this.submenus.length; i++) states.push(this.submenus[i].className == "collapsed" ? 0 : 1); var d = new Date(); d.setTime(d.getTime() + (30 * 24 * 60 * 60 * 1000)); [removed] = "sdmenu_" + encodeURIComponent(this.menu.id) + "=" + states.join("") + "; expires=" + d.toGMTString() + "; path=/"; } }; </script> </head> <body> <div style="float:left" id="my_menu" class="sdmenu"> <div> <span>ÍøÒ³´úÂëÕ¾ºǫ́¹ÜÀí</span> <a href="/">> ÍøÒ³ÌØЧ</a> <a href="/">> ´úÂë·ÖÀà</a> <a href="http://www.webdm.cn">> ×îиüÐÂ</a> <a href="/">> ÏÂÔØÅÅÐÐ</a> </div> <div> <span>ASPÔ´ÂëÏÂÔØ</span> <a href="/">> ÁÄÌìÁôÑÔ</a> <a href="/">> ÆóÒµ½¨Õ¾</a> </div> <div> <span>PHPÔ´ÂëÏÂÔØ</span> <a href="/">> CMSϵͳ</a> <a href="/">> ѧУÕþ¸®</a> <a href="/">> Ó°ÒôÊÓƵ</a> </div> <div> <span>ASP.NET¾«Æ·Ô´Âë</span> <a href="/">> °ì¹«¹ÜÀí</a> <a href="http://www.webdm.cn">> ²É¼¯</a> <a href="/">> ÕûÕ¾³ÌÐò</a> </div> <div> <span>ÐÂÎÅÎÄÕ¹ÜÀí</span> <a href="/">> °ì¹«¹ÜÀí</a> <a href="/">> С͵²É¼¯</a> </div> </div> </body> </html>
ÍƼöÐÅÏ¢
- jqueryʵÏÖÍøվͼƬÀÁ¼ÓÔØ´úÂë
- jQuery Tooltips²å¼þ
- jQueryµÄ.bind()¡¢.live()ºÍ.delegate(....
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- Ä㲻ϲ»¶»ðºü£¬µ«ÓÖϲ»¶firebug£¬ÄǾ͸úÎÒÒ»ÆðÀ´ÔÚIEÉÏ....
- ¸ù¾ÝÏÔʾÆ÷·Ö±æÂʵ÷ÕûÒ³ÃæÏÔʾµÄJavascript½Å±¾
- jQuery дµÄ·ÂÐÂÀË΢²© ÏòϹö¶¯Ð§¹û¡¾×ªÔØ¡¿
- ͨÓõÄJqueryÑ¡ÔñÆ÷
- jQuery ½áºÏ Json Ìá½»Êý¾Ýµ½Webservice£¬....
- ×ÔÖÆjQueryÖÇÄÜÌáʾ²å¼þһö
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- js»ñÈ¡srcÖд«µÝµÄ²ÎÊý
- jqueryʵÏÖÍøվͼƬÀÁ¼ÓÔØ´úÂë
- ÈÃä¯ÀÀÆ÷ÆÁ±ÎµôJavaScriptµÄ³ö´íÌáʾ
- github²»ÄܼÓÔØcss¡¢js½â¾ö°ì·¨
- ÎÒÖªµÀµÄJavaScript -- Éè¼Æģʽ(ÇŽÓ)Ó¦ÓÃÖ® ¨C ....
- 15¸öÖµµÃ¿ª·¢ÈËÔ±¹Ø×¢µÄjQuery¿ª·¢¼¼ÇɺÍÐĵÃ
- dz̸JavascriptÃæÏò¶ÔÏó±à³Ì
- JS¼òµ¥¶¯»·â×°
- JavaScript³õѧÕßӦעÒâµÄÆ߸öϸ½Ú
- jQuery Tooltips²å¼þ
ÆÀÂÛ