menujs免费源代码下载(menujs)

本文目录一览:

简单易懂的jQuery导航(三级菜单)源码

!– 三级操蛋导航 —

div class=”nav_left”

div class=”nav_leftlist”

h2b/b用户系统/h2

dl

dtb/b用户管理/dt

dd

a class=”cur” href=””商户信息b/b/a

a href=””用户信息b/b/a

/dd

/dl

/div

div class=”nav_leftlist”

h2b/b财务系统/h2

dl

dtb/b系统账务/dt

dd

a href=””平台账单b/b/a

a href=””账单明细b/b/a

/dd

/dl

dl

dtb/b商户账务/dt

dd

a href=””商户账单b/b/a

a href=””提现管理b/b/a

/dd

/dl

dl

dtb/b用户账务/dt

dd

a href=””用户账单b/b/a

a href=””提现管理b/b/a

/dd

/dl

/div

/div

style

.nav_left{background: #232b35;height: 100%;width: 220px;min-height: 600px;position: fixed;top: 100px;left: 0;}

.nav_leftlist{}

.nav_leftlist h2{height: 50px;line-height: 50px;padding-left: 40px;font-size: 16px;background: #3b444f;color: #999999;position: relative;cursor: pointer;}

.nav_leftlist h2 b{position: absolute;top: 20px;left: 13px;width: 16px;height: 9px;background: url(../images/icon04.png) no-repeat;background-position: 0 0;cursor: pointer;}

.nav_leftlist h2 b.cur{background-position: -16px 0;}

.nav_leftlist dl{}

.nav_leftlist dl dt{height: 50px;line-height: 50px;background: #2c3643;font-size: 16px;color: #ffffff;padding-left: 60px;position: relative;cursor: pointer;}

.nav_leftlist dl dt b{position: absolute;top: 20px;left: 34px;width: 16px;height: 9px;background: url(../images/icon04.png) no-repeat;background-position: 0 -10px;}

.nav_leftlist dl dt b.cur{background-position: -16px -10px;}

.nav_leftlist dl dd{}

.nav_leftlist dl dd a{display: block;height: 50px;line-height: 50px;color: #fff;padding-left: 80px;font-size: 16px;position: relative;}

.nav_leftlist dl dd a.cur{color: #ee581c;}

.nav_leftlist dl dd a.cur b{display: block;position: absolute;top: 16px;right: -1px;width: 11px;height: 18px;background: url(../images/icon04.png) no-repeat;background-position: 0 -20px;}

/style

/body

script type=”text/javascript” src=”../js/jquery.js” /script

script type=”text/javascript” 

$(function(){

$(‘.nav_leftlist’).on(‘click’, ‘h2’, function(event) {

$(this).siblings(‘dl’).toggle();

if($(this).siblings(‘dl’).css(‘display’)==’none’){

$(this).find(‘b’).addClass(‘cur’);

}else{

$(this).find(‘b’).removeClass(‘cur’);

}

});

$(‘.nav_leftlist’).on(‘click’, ‘dl dt’, function(event) {

$(this).siblings(‘dd’).toggle();

if($(this).siblings(‘dd’).css(‘display’)==’none’){

$(this).find(‘b’).addClass(‘cur’);

}else{

$(this).find(‘b’).removeClass(‘cur’);

}

});

})

/script

效果图:

电影《源代码》国语版高清在线观看 电影《源代码》完整下载

《源代码》百度网盘高清资源免费在线观看

链接:

提取码: fnkx  

影片讲述了一位在阿富汗执行任务的美国空军飞行员柯尔特·史蒂文斯,醒来时发现自己正处在一辆前往芝加哥的火车上,并就此经历的一系列惊心动魄的事件。

怎么把一个网页的js代码下载 下来啊

你先找一下那个页面的源代码,一般在网页最上面的查看-源文件-然后找到文中有js的那个路径,讲路径复制粘贴到迅雷中就可以了,记住要把上面的地址连同js的地址一起粘贴上去

www.code123.net这个网址做的不错,源码哪里可以下啊

这是首页的源代码:!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”

html

head

meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″

title首页 – 源码世界(Code123.Net) – asp源码,cgi源码,php源码,jsp源码,.net源码,网站素材,网页素材,网页模板,商业模板,免费模板,常用软件,注册版,破解版,免费LOGO,娱乐,flash动画,网络编程,网络学院,站长资源,网站联盟,精品网址,图片,壁纸,桌面,书籍教程,服务器架设,服务器软件,电子图书,LOGO模板,精品字体,字体下载,软件下载,源码下载,源码 /title

meta name=keywords content=”源码世界 asp源码,cgi源码,php源码,jsp源码,.net源码,网站素材,网页素材,网页模板,商业模板,免费模板,常用软件,注册版,破解版,免费LOGO,娱乐,flash动画,网络编程,网络学院,站长资源,网站联盟,精品网址,图片,壁纸,桌面,书籍教程,服务器架设,服务器软件,电子图书,LOGO模板,精品字体,字体下载,软件下载,源码下载,源码”

meta name=”description” content=”首页 ,源码世界”

LINK href=”/skin/default/style.css” type=text/css rel=stylesheet

meta name=”MSSmartTagsPreventParsing” content=”TRUE”

meta http-equiv=”MSThemeCompatible” content=”Yes”

meta http-equiv=”html” content=”no-cache”

/head

script src=”/inc/menu.js” type=”text/javascript”/script

body

table width=”778″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”tableborder”

tr

td height=”5″/td

/tr

tr

td height=”25″ align=”right” class=”tablebody”a href=”/” class=navmenu首 页/a ┆ a href=”/Article/” title=”站长学院” class=navmenu站长学院/a ┆ a href=”/soft/” title=”源码下载” class=navmenu源码下载/a ┆ a href=”/GuestBook/” title=”客户留言” class=navmenu客户留言/a ┆ a name=”StranLink” style=”color:red”繁体中文/a/td

/tr

tr

td height=”1″/td

/tr

tr

td height=”74″ background=”/skin/default/top1.gif”table width=”100%” border=0 align=center cellpadding=0 cellspacing=0

tr

td width=”180″ align=”center”img src=”/skin/default/logo.gif” width=”180″ height=”60″/td

td width=”500″ align=”center”script language=javascript src=/adfile/banner.js/script/td

td width=”90″ height=”70″ align=”center” nowrapimg src=”/skin/default/top_home.gif” width=”13″ height=”12″ border=0 a onclick=”this.style.behavior=’url(#default#homepage)’;this.sethomepage(”);return false;” href=”” title=”将本站设为你的首页”设为首页/abr

img src=”/skin/default/top_gift.gif” width=”13″ height=”12″ border=0 a href=”javascript:window.external.AddFavorite(location.href,document.title)” title=”将本站加入到你的收藏夹”加入收藏/abr

img src=”/skin/default/top_mail.gif” width=”13″ height=”12″ border=0 a href=”mailto:code123@126.com”联系我们/a/td

/tr

/table/td

/tr

tr

td height=”1″/td

/tr

/table

table width=”778″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”tableborder”

tr height=”22″

td align=”center” nowrap class=”navbarbg” 源码:/td

td width=”96%” class=”navbarbg”a href=’/soft/asp/’ class=navbar title=’ASP 源码’ASP 源码/a | a href=’/soft/php/’ class=navbar title=’PHP 源码’PHP 源码/a | a href=’/soft/net/’ class=navbar title=’.NET源码’.NET源码/a | a href=’/soft/cgi/’ class=navbar title=’CGI 源码’CGI 源码/a | a href=’/soft/jsp/’ class=navbar title=’JSP 源码’JSP 源码/a | a href=’/soft/fla/’ class=navbar title=’Fla 源码’Fla 源码/a | a href=’/soft/server/’ class=navbar title=’服务器类’服务器类/a | a href=’/soft/book/’ class=navbar title=’书籍教程’书籍教程/a | a href=’/soft/mb/’ class=navbar title=’网页模板’网页模板/a | a href=’/soft/material/’ class=navbar title=’网站素材’网站素材/a | a href=’/soft/font/’ class=navbar title=’字体下载’字体下载/a/td

/tr

tr height=”22″

td align=”center” nowrap class=”navbarbg” 学院:/td

td class=”navbarbg”a href=’/Article/program/’ class=navbar title=’网络编程’网络编程/a | a href=’/Article/website/’ class=navbar title=’网页设计’网页设计/a | a href=’/Article/photo/’ class=navbar title=’图形图象’图形图象/a | a href=’/Article/database/’ class=navbar title=’数 据 库’数 据 库/a | a href=’/Article/server/’ class=navbar title=’服 务 器’服 务 器/a | a href=’/Article/Media/’ class=navbar title=’网络媒体’网络媒体/a | a href=’/Article/Security/’ class=navbar title=’网络安全’网络安全/a | a href=’/Article/Club/’ class=navbar title=’站长CLUB’站长CLUB/a/td

/tr

tr

td height=”1″ colspan=”3″ bgcolor=”#DFDFDF”/td

/tr

/table

table width=”778″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”tableborder”

tr

td height=”2″/td

/tr

tr

td bgcolor=”#EFEFEF”iframe src=”/login.asp” border=0 width=100% height=26 frameborder=0 scrolling=no/iframe/td

/tr

tr

td height=”2″/td

/tr

/table

table width=”778″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”tableborder”

tr

tdscript language=javascript src=/adfile/top.js/script/td

/tr

tr

td height=”5″/td

/tr

tr

td height=”8″ class=”linebar”/td

/tr

tr

td height=”5″/td

/tr

/table!–#index 首页当前位置–

table width=”778″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”tableborder”

tr

td height=”22″ bgcolor=”#EFEFEF”table width=”100%” border=”0″ cellspacing=”2″ cellpadding=”0″

tr

td width=”4%” align=”center”img src=”/skin/default/class_ar.gif” width=”13″ height=”13″/td

td width=”74%”您当前的位置:a href=”/”源码世界/a – 首页/td

td width=”22%” align=”center”img src=”/skin/default/h_arrow.gif” width=”11″ height=”11″ align=”absmiddle” a href=”/user/logout.asp”退出登录/a img src=”/skin/default/h_arrow.gif” width=”11″ height=”11″ align=”absmiddle” a href=”/user/”用户管理/a/td

/tr

/table/td

/tr

tr

td height=”1″ bgcolor=”D9D9D9″/td

/tr

tr

td height=”5″/td

/tr

/table

table width=”778″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”tableborder”

tr valign=”top”

td width=”188″ class=”tableleft”

table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″

tr

td class=”titleback2″站内统计/td

/tr

tr

td height=”100″ valign=”top”

· 共有文章数量: font color=redstrong10712/strong/font 篇br

· 今日更新文章: font color=redstrong0/strong/font 篇br

· 文章总阅览数: font color=redstrong8440/strong/font 次br

· 共有软件数量: font color=redstrong2525/strong/font 个br

· 今日更新软件: font color=redstrong21/strong/font 个br

· 软件总下载数: font color=redstrong22272/strong/font 次br

· 软件总的容量: font color=redstrong7.579/strong/font Gbr

· 发表留言总数: font color=redstrong1/strong/fontbr

· 今日发表留言: font color=redstrong0/strong/fontbr

· 注册会员总数: font color=redstrong125/strong/fontbr

· 当前在线人数: strong style=”color:red;”script src=”count.asp?id=1″ type=”text/javascript”/script/td

/tr

/table /td

td width=”588″ align=”right” class=”tableright”

table width=”575″ border=”0″ cellspacing=”0″ cellpadding=”0″ class=”showbody3″

tr height=”25″

td width=”35″ align=”center” bgcolor=”#EFEFEF”img src=”/skin/default/announce.gif” width=”20″ height=”16″/td

td width=”540″ bgcolor=”#EFEFEF”marquee scrollAmount=3· a href=”/Announce.Asp?AnnounceID=1″ title=”如果您遇到不可下载的源码请报错给我们” target=”_blank”如果您遇到不可下载的源…/a  font color=’#808080’2006-03-31/font

/marquee/td

/tr

/table

table width=”575″ border=”0″ cellspacing=”0″ cellpadding=”0″

tr

td height=”5″ colspan=”2″/td

/tr

tr

td width=”406″ height=”25″ class=”titleback3″ 最近推荐作品/td

/tr

td valign=”top” class=”showbody1″table width=”100%” border=”0″ cellpadding=”1″ cellspacing=”3″

tr

td align=”center” class=”imagelist”div class=”divpic”a href=’/soft/book/php/2487.html’ title=’PHPMORE’ target=”_blank”img src=”/soft/UploadPic/2006-4/2006441715285619.jpg” width=120 height=100 border=0/a/div

div style=”line-height: 22px;”a href=’/soft/book/php/2487.html’ title=’PHPMORE’ target=”_blank”PHPMORE…/a/div/td

td align=”center” class=”imagelist”div class=”divpic”a href=’/soft/book/php/2486.html’ title=’PHP 5 揭密(CHM)’ target=”_blank”img src=”/soft/UploadPic/2006-4/2006441704043785.jpg” width=120 height=100 border=0/a/div

div style=”line-height: 22px;”a href=’/soft/book/php/2486.html’ title=’PHP 5 揭密(CHM)’ target=”_blank”PHP 5 揭…/a/div/td

td align=”center” class=”imagelist”div class=”divpic”a href=’/soft/material/pic/2355.html’ title=’2300多个经典新图标’ target=”_blank”img src=”/soft/UploadPic/2006-3/200633017585771686.gif” width=120 height=100 border=0/a/div

div style=”line-height: 22px;”a href=’/soft/material/pic/2355.html’ title=’2300多个经典新图标’ target=”_blank”2300多个…/a/div/td

td align=”center” class=”imagelist”div class=”divpic”a href=’/soft/asp/ofter/2346.html’ title=’科汛网站管理系统 2006 SP1 全功能免费正式版’ target=”_blank”img src=”/soft/UploadPic/2006-3/20063301811264057.gif” width=120 height=100 border=0/a/div

div style=”line-height: 22px;”a href=’/soft/asp/ofter/2346.html’ title=’科汛网站管理系统 2006 SP1 全功能免费正式版’ target=”_blank”科汛网站…/a/div/td

/tr

/table

/td

/tr

/table

table width=”575″ border=”0″ cellspacing=”0″ cellpadding=”0″

tr

td height=”5″ colspan=”2″/td

/tr

tr

td width=”130″ height=”30″ bgcolor=”#EFEFEF”img src=”/skin/default/search.gif” width=”120″ height=”26″/td

td width=”445″ bgcolor=”#EFEFEF”!–搜索表单–table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″

tr

form onSubmit=”window.location=this.field.options[this.field.selectedIndex].value+this.keyword.value; return false;”

td bgcolor=”#EFEFEF” height=”25″ nowrap

input name=”keyword” size=”30″ value=’关键字’ maxlength=’50’ onFocus=’this.select();’

select name=”field”

option value=”soft/search.asp?act=topickeyword=”软件下载/option

option value=”article/search.asp?act=topickeyword=”新闻资讯/option

option value=”flash/search.asp?act=topickeyword=”FLASH搜索/option

option value=”article/search.asp?act=isWebkeyword=”网页搜索/option

/select

input name=”Submit” src=”skin/default/d_search.gif” type=”image” value=”Submit” width=”60″ height=”20″ align=”absmiddle” border=”0″/td

/form

/tr

/table/td

/tr

tr

td height=”5″ colspan=”2″/td

/tr

/table

/td

/tr

/table

table width=”778″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”tableborder”

tr

td align=”center”script language=”javascript” src=”adfile/indexmid.js”/script/td

/tr

/table

table width=”778″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″ class=”tableborder”

tr valign=”top”

td width=”188″ height=”300″ class=”tableleft”table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″

tr

td class=”titleback1″热门下载/td

/tr

tr

td height=”100″ valign=”top”table width=”100%” border=0 cellpadding=2 cellspacing=0tr

td class=”showlist1″· a href=’/soft/asp/fun/932.html’ target=”_blank” title=’源码名称:亚阳影视 v1.3

发布时间:2006-2-22 2:18:57

下载次数:4208′ class=showlist亚阳影视 v1.3/a/td

td align=right class=”showlist1″/td

/trtr

td class=”showlist2″· a href=’/soft/mb/flash/134.html’ target=”_blank” title=’源码名称:6套FLASH+HTML网页模版

发布时间:2006-2-16 17:08:22

下载次数:283′ class=showlist6套FLASH+HTML网页模版…/a/td

td align=right class=”showlist2″/td

/trtr

td class=”showlist1″· a href=’/soft/font/cn/1411.html’ target=”_blank” title=’源码名称:创意最新25款中文字体

发布时间:2006-2-24 17:46:31

下载次数:261′ class=showlist创意最新25款中文字体…/a/td

td align=right class=”showlist1″/td

/trtr

td class=”showlist2″· a href=’/soft/material/icon/1712.html’ target=”_blank” title=’源码名称:1351个晶莹剔透的水晶按钮图标

发布时间:2006-3-7 12:49:37

下载次数:247′ class=showlist1351个晶莹剔透的水晶…/a/td

td align=right class=”showlist2″/td

/trtr

td class=”showlist1″· a href=’/soft/mb/web/131.html’ target=”_blank” title=’源码名称:漂亮清新的全站模板

发布时间:2006-2-16 16:52:58

下载次数:203′ class=showlist漂亮清新的全站模板/a/td

td align=right class=”showlist1″/td

/trtr

td class=”showlist2″· a href=’/soft/font/cn/78.html’ target=”_blank” title=’源码名称:方正黄草简体

发布时间:2006-2-16 13:38:30

下载次数:168′ class=showlist方正黄草简体/a/td

td align=right class=”showlist2″/td

/trtr

td class=”showlist1″· a href=’/soft/asp/news/2159.html’ target=”_blank” title=’源码名称:凡尘文章管理系统

发布时间:2006-3-24 7:41:35

下载次数:161′ class=showlist凡尘文章管理系统/a/td

td align=right class=”showlist1″/td

/trtr

td class=”showlist2″· a href=’/soft/mb/korea/1661.html’ target=”_blank” title=’源码名称:一个不错的韩国网站模版

发布时间:2006-3-4 19:16:45

下载次数:139′ class=showlist一个不错的韩国网站模…/a/td

td align=right class=”showlist2″/td

/trtr

td class=”showlist1″· a href=’/soft/mb/common/1662.html’ target=”_blank” title=’源码名称:经典2006绿色清爽荷叶个人主页 V2.0

发布时间:2006-3-4 19:25:17

下载次数:136′ class=showlist经典2006绿色清爽荷叶…/a/td

td align=right class=”showlist1″/td

/tr/table/td

/tr

tr

td height=”3″ bgcolor=”#FFFFFF”/td

/tr

/table

table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″

tr

td class=”titleback2″投票调查/td

/tr

tr

td height=”100″ valign=”top”iframe src=”vote/vote.htm” border=”0″ width=”100%” height=”220″ frameborder=”0″ scrolling=”no”/iframe /td

/tr

/table/td

td width=”588″ align=”right” class=”tableright”table width=”575″ border=”0″ cellspacing=”0″ cellpadding=”0″

tr

td width=”286″ class=”showtitle3″ 源码更新/td

td width=”3″ rowspan=”2″/td

td width=”286″ class=”showtitle3″ 文章更新/td

/tr

tr

td height=”150″ valign=”top” class=”showbody1″table width=”100%” border=0 cellpadding=2 cellspacing=0tr

td class=”showlist1″· a href=’/soft/asp/business/2551.html’ title=’源码名称:凤台中介

发布时间:2006-4-7 15:12:34

下载次数:0′ class=showlist凤台中介/a/td

td align=right class=”showlist1″font color=’#FF0066’04-07/font/td

/trtr

td class=”showlist2″· a href=’/soft/asp/web/2550.html’ title=’源码名称:蝗虫乐队中文网 v1.0

发布时间:2006-4-7 15:11:23

下载次数:0′ class=showlist蝗虫乐队中文网 v1.0/a/td

td align=right class=”showlist2″font color=’#FF0066’04-07/font/td

/trtr

td class=”showlist1″· a href=’/soft/asp/web/2549.html’ title=’源码名称:蝴蝶养猫个人主页完美版

发布时间:2006-4-7 15:10:09

下载次数:0′ class=showlist蝴蝶养猫个人主页完美版/a/td

td align=right class=”showlist1″font color=’#FF0066’04-07/font/td

/trtr

td class=”showlist2″· a href=’/soft/asp/web/2548.html’ title=’源码名称:666传奇私服发布系统绿色版 v2.9绿色美化版

发布时间:2006-4-7 14:41:16

下载次数:0′ class=showlist666传奇私服发布系统绿色版…/a/td

td align=right class=”showlist2″font color=’#FF0066’04-07/font/td

/trtr

td class=”showlist1″· a href=’/soft/asp/fun/2547.html’ title=’源码名称:1624部视频(电影)生成本地HTML 1.0

发布时间:2006-4-7 14:40:11

下载次数:0′ class=showlist1624部视频(电影)生成本地…/a/td

td align=right class=”showlist1″font color=’#FF0066’04-07/font/td

/trtr

td class=”showlist2″· a href=’/soft/asp/web/2546.html’ title=’源码名称:Asicn在线-网址导航 V1.0

发布时间:2006-4-7 14:39:01

下载次数:0′ class=showlistAsicn在线-网址导航 V1.0/a/td

td align=right class=”showlist2″font color=’#FF0066’04-07/font/td

/trtr

td class=”showlist1″· a href=’/soft/asp/web/2545.html’ title=’源码名称:QQ娱乐资源网音乐插件版

发布时间:2006-4-7 14:34:51

下载次数:0′ class=showlistQQ娱乐资源网音乐插件版/a/td

td align=right class=”showlist1″font color=’#FF0066’04-07/font/td

/trtr

td class=”showlist2″· a href=’/soft/asp/web/2544.html’ title=’源码名称:江中岛星座情缘 4.1

发布时间:2006-4-7 14:33:34

下载次数:0′ class=showlist江中岛星座情缘 4.1/a/td

td align=right class=”showlist2″font color=’#FF0066’04-07/font/td

/trtr

td class=”showlist1″· a href=’/soft/asp/ofter/2543.html’ title=’源码名称:江中岛(扬中)友情连接自助系统(美化版本) 4.1

发布时间:2006-4-7 14:32:21

下载次数:0′ class=showlist江中岛(扬中)友情连接自…/a/td

td align=right class=”showlist1″font color=’#FF0066’04-07/font/td

/tr/table/td

td valign=”top” class=”showbody2″table width=”100%” border=0 cellpadding=2 cellspacing=0tr

td class=”showlist1″· font color=’#FF0066′[组图]/font a href=’/Article/photo/photoshop/10713.html’ target=”_blank” title=’文章标题:Photoshop调整色彩饱和度欠佳的图片

发布时间:2006-4-6 10:25:22

阅览次数:3′ class=showlistPhotoshop调整色彩饱和度欠…/a/td

td class=”showlist1″font color=’#808080’04-06/font/td

/trtr

td class=”showlist2″· font color=’#FF0066′[组图]/font a href=’/Article/photo/photoshop/10712.html’ target=”_blank” title=’文章标题:Photoshop鼠绘一个鲜脆欲滴的苹果

发布时间:2006-4-6 10:24:26

阅览次数:1′ class=showlistPhotoshop鼠绘一个鲜脆欲滴…/a/td

td class=”showlist2″font color=’#80

谁内给我讲一将如下 下拉菜单的js代码

第一, visibility:heddin;是让子菜单初始化时隐藏。这样下面的showmenu函数显示时才有从无到有的效果。

第二 showmenu 是函数名字,可以自己命名,规则和变量名规则一样

第三 触发这个函数时 把子菜单的显示属性设置为显示 如果是hidden 则隐藏。menu是子菜单对象 style是子菜单的样式对象,也可以说是样式属性 visibility是设置网页元素显示与否的样式属性 这里可以改成menu.style.display=””;

第四 document.onclick = hidmenu;是给网页单击事件指定处理函数

这是例子,如果是放到实际网页里就不能这么写了

最好是给每个a标签指定 onclick事件

像下边一样 a href=”javascript:showmenu()”下拉菜单/a

关于下拉菜单的JS代码

style type=”text/css”

#mainMenu{

background-color: #FFF; /* Background color of main menu */

font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; /* Fonts of main menu items */

font-size:1.2em; /* Font size of main menu items */

border-bottom:1px solid #000000; /* Bottom border of main menu */

height:30px; /* Height of main menu */

position:relative; /* Don’t change this position attribute */

visibility: hidden;

}

#mainMenu a{

padding-left:20px; /* Spaces at the left of main menu items */

padding-right:20px; /* Spaces at the right of main menu items */

font-weight: bold;

/* Don’t change these two options */

position:absolute;

bottom:-1px;

}

#submenu{

font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; /* Font of sub menu items */

background-color:#E2EBED; /* Background color of sub menu items */

visibility: hidden;

width:778px; /* Don’t change this option */

}

htmlbody #clearmenu{ /* non IE browsers menu bottom spacing */

margin-bottom: 2px;

}

#submenu div{

white-space:nowrap; /* Don’t change this option */

}

/*

Style attributes of active menu item

*/

#mainMenu .activeMenuItem{

/* Border options */

border-left:1px solid #000000;

border-top:1px solid #000000;

border-right:1px solid #000000;

background-color: #E2EBED; /* Background color */

cursor:pointer; /* Cursor like a hand when the user moves the mouse over the menu item */

}

/*

Style attributes of inactive menu items

*/

#mainMenu .inactiveMenuItem{

color: #000; /* Text color */

cursor:pointer; /* Cursor like a hand when the user moves the mouse over the menu item */

}

#submenu a{

text-decoration:none; /* No underline on sub menu items – use text-decoration:underline; if you want the links to be underlined */

padding-left:5px; /* Space at the left of each sub menu item */

padding-right:5px; /* Space at the right of each sub menu item */

color: #000; /* Text color */

}

#submenu a:hover{

color: #FF0000; /* Red color when the user moves the mouse over sub menu items */

}

/style

script type=”text/javascript”

//more javascript from

var topMenuSpacer = 15; // Horizontal space(pixels) between the main menu items

var activateSubOnClick = false; // if true- Show sub menu items on click, if false, show submenu items onmouseover

var leftAlignSubItems = false; // left align sub items t

var activeMenuItem = false; // Don’t change this option. It should initially be false

var activeTabIndex = 0; // Index of initial active tab (0 = first tab) – If the value below is set to true, it will override this one.

var rememberActiveTabByCookie = true; // Set it to true if you want to be able to save active tab as cookie

/*

These cookie functions are downloaded from

*/

function Get_Cookie(name) {

var start = document.cookie.indexOf(name+”=”);

var len = start+name.length+1;

if ((!start) (name != document.cookie.substring(0,name.length))) return null;

if (start == -1) return null;

var end = document.cookie.indexOf(“;”,len);

if (end == -1) end = document.cookie.length;

return unescape(document.cookie.substring(len,end));

}

// This function has been slightly modified

function Set_Cookie(name,value,expires,path,domain,secure) {

expires = expires * 60*60*24*1000;

var today = new Date();

var expires_date = new Date( today.getTime() + (expires) );

var cookieString = name + “=” +escape(value) +

( (expires) ? “;expires=” + expires_date.toGMTString() : “”) +

( (path) ? “;path=” + path : “”) +

( (domain) ? “;domain=” + domain : “”) +

( (secure) ? “;secure” : “”);

document.cookie = cookieString;

}

function showHide()

{

if(activeMenuItem){

activeMenuItem.className = ‘inactiveMenuItem’;

var theId = activeMenuItem.id.replace(/[^\d]/g,”);

document.getElementById(‘submenu_’+theId).style.display=’none’;

}

activeMenuItem = this;

this.className = ‘activeMenuItem’;

var theId = this.id.replace(/[^\d]/g,”);

document.getElementById(‘submenu_’+theId).style.display=’block’;

if(rememberActiveTabByCookie){

Set_Cookie(‘dhtmlgoodies_tab_menu_tabIndex’,’index: ‘ + (theId-1),100);

}

}

function initMenu()

{

var mainMenuObj = document.getElementById(‘mainMenu’);

var subMenuObj = document.getElementById(‘submenu’); //DD added line

mainMenuObj.style.visibility=subMenuObj.style.visibility=”visible” //DD added line

var menuItems = mainMenuObj.getElementsByTagName(‘A’);

if(document.all){

mainMenuObj.style.visibility = ‘hidden’;

document.getElementById(‘submenu’).style.visibility=’hidden’;

}

if(rememberActiveTabByCookie){

var cookieValue = Get_Cookie(‘dhtmlgoodies_tab_menu_tabIndex’) + ”;

cookieValue = cookieValue.replace(/[^\d]/g,”);

if(cookieValue.length0 cookieValuemenuItems.length){

activeTabIndex = cookieValue/1;

}

}

var currentLeftPos = 15;

for(var no=0;nomenuItems.length;no++){

if(activateSubOnClick)menuItems[no].onclick = showHide; else menuItems[no].onmouseover = showHide;

menuItems[no].id = ‘mainMenuItem’ + (no+1);

menuItems[no].style.left = currentLeftPos + ‘px’;

currentLeftPos = currentLeftPos + menuItems[no].offsetWidth + topMenuSpacer;

if(no==activeTabIndex){

menuItems[no].className=’activeMenuItem’;

activeMenuItem = menuItems[no];

}else menuItems[no].className=’inactiveMenuItem’;

if(!document.all)menuItems[no].style.bottom = ‘-1px’;

}

var mainMenuLinks = mainMenuObj.getElementsByTagName(‘A’);

var subCounter = 1;

var parentWidth = mainMenuObj.offsetWidth;

while(document.getElementById(‘submenu_’ + subCounter)){

var subItem = document.getElementById(‘submenu_’ + subCounter);

if(leftAlignSubItems){

// No action

}else{

var leftPos = mainMenuLinks[subCounter-1].offsetLeft;

document.getElementById(‘submenu_’+subCounter).style.paddingLeft = leftPos + ‘px’;

subItem.style.position =’absolute’;

if(subItem.offsetWidth parentWidth){

leftPos = leftPos – Math.max(0,subItem.offsetWidth-parentWidth);

}

subItem.style.paddingLeft = leftPos + ‘px’;

subItem.style.position =’static’;

}

if(subCounter==(activeTabIndex+1)){

subItem.style.display=’block’;

}else{

subItem.style.display=’none’;

}

subCounter++;

}

if(document.all){

mainMenuObj.style.visibility = ‘visible’;

document.getElementById(‘submenu’).style.visibility=’visible’;

}

document.getElementById(‘submenu’).style.display=’block’;

}

window.onload = initMenu;

/script

div id=”mainMenu”

a网页特效/a

a插件下载/a

a网络学院/a

a网站联盟/a

/div

div id=”submenu”

!– The first sub menu —

div id=”submenu_1″

a href=”图形图像”图形图像/a

a href=”鼠标事件”鼠标事件/a

a href=”时间日期”时间日期/a

a href=”导航菜单”导航菜单/a

a href=”文字效果”文字效果/a

a href=”窗体变化”窗体变化/a

/div

!– Second sub menu —

div id=”submenu_2″

a href=”插件”DreamWeaver插件/a

a href=”插件”FireWork插件/a

a href=”插件”PhotoShop插件/a

a href=”组件”FLASH组件/a

/div

!– Third sub menu —

div id=”submenu_3″

a href=”网页制作”网页制作/a

a href=”网络编程”网络编程/a

a href=”图形图像”图形图像/a

a href=”多媒体制作”多媒体制作/a

a href=”网站建设”网站建设/a

a href=”操作系统”操作系统/a

/div

!– Fourth sub menu —

div id=”submenu_4″

a href=””网页设计/a

a href=””艺术创作/a

a href=””电脑网络/a

a href=””生活休闲/a

a href=””个性展示/a

a href=””其它类型/a

/div

/div

br id=”clearmenu” /

原创文章,作者:小蓝,如若转载,请注明出处:https://www.506064.com/n/272135.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
小蓝小蓝
上一篇 2024-12-17 00:08
下一篇 2024-12-17 00:08

相关推荐

发表回复

登录后才能评论