急,菜鸟求一简单的JavaScrip特效(在线等,有结果了,马上结分) 请各位根据我的意思把代码给贴出来,谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以下一个这样的树状菜单 我们做东西也是下的 :) 我只大略的看了过一次 是把值从数据库中取出来 然后区别菜单的几种状态 放到数组里 我没研究过脚本 所以也不怎么明白 但是只是从菜单中把值取出 传到另一个页面 :) <head><style><!--#foldheader{cursor:hand ; font-weight:bold ;list-style-image:url(fold.gif)}#foldinglist{list-style-image:url(list.gif)}//--></style><script language="JavaScript1.2"><!--/** * Based on Folding Menu Tree * Dynamic Drive (www.dynamicdrive.com) * For full source code, installation instructions, * 100's more DHTML scripts, and Terms Of * Use, visit dynamicdrive.com * * Updated to support arbitrarily nested lists * by Mark Quinn (@robocast.com) November 2nd 1998 */var head="display:''"img1=new Image()img1.src="fold.gif"img2=new Image()img2.src="open.gif"function change(){ if(!document.all) return if (event.srcElement.id=="foldheader") { var srcIndex = event.srcElement.sourceIndex var nested = document.all[srcIndex+1] if (nested.style.display=="none") { nested.style.display='' event.srcElement.style.listStyleImage="url(open.gif)" } else { nested.style.display="none" event.srcElement.style.listStyleImage="url(fold.gif)" } }}document.onclick=change//--></script></head><body><ul> <li id="foldheader">News</li> <ul id="foldinglist" style="display:none"> <li><a href="http://www.cnn.com">CNN</a></li> <li><a href="http://www.abcnews.com">ABC News</a></li> <li><a href="http://www.vancouversun.com">Vancouver Sun</a></li> </ul> <li id="foldheader">Games</li> <ul id="foldinglist" style="display:none"> <li><a href="http://www.gamespot.com">GameSpot</a></li> <li><a href="http://www.happypuppy.com">Happy Puppy</a></li> <li><a href="http://www.gamecenter.com">Game Center</a></li> </ul> <li id="foldheader">Software</li> <ul id="foldinglist" style="display:none"> <li><a href="http://www.download.com">outer 1</a></li> <li><a href="http://www.hotfiles.com">outer 2</a></li> <li id="foldheader">Nested</li> <ul id="foldinglist" style="display:none"> <li><a href="http://www.windows95.com">nested 1</a></li> <li><a href="http://www.shareware.com">nested 2</a></li> </ul> <li><a href="http://www.windows95.com">outer 3</a></li> <li><a href="http://www.shareware.com">outer 4</a></li> </ul></ul></body> 奇葩问题,望高人指点迷津! 后台图片问题 jsp上传本地图片问题! ssh框架整个报错(急) 请教struts1中的问题 请教一个关于jsp页面之间参数传递的问题,在线等! 有关web的select问题 如何取得ResultSet的总记录条数 请问这句话什么意思 :ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE List<map<String,Object>>数据格式拼接问题 [求助]为什么出现这问题?? 关于post和get的问题
我没研究过脚本 所以也不怎么明白 但是只是从菜单中把值取出 传到另一个页面 :)
<style>
<!--
#foldheader{cursor:hand ; font-weight:bold ;
list-style-image:url(fold.gif)}
#foldinglist{list-style-image:url(list.gif)}
//-->
</style>
<script language="JavaScript1.2">
<!--
/**
* Based on Folding Menu Tree
* Dynamic Drive (www.dynamicdrive.com)
* For full source code, installation instructions,
* 100's more DHTML scripts, and Terms Of
* Use, visit dynamicdrive.com
*
* Updated to support arbitrarily nested lists
* by Mark Quinn (@robocast.com) November 2nd 1998
*/var head="display:''"
img1=new Image()
img1.src="fold.gif"
img2=new Image()
img2.src="open.gif"function change(){
if(!document.all)
return
if (event.srcElement.id=="foldheader") {
var srcIndex = event.srcElement.sourceIndex
var nested = document.all[srcIndex+1]
if (nested.style.display=="none") {
nested.style.display=''
event.srcElement.style.listStyleImage="url(open.gif)"
}
else {
nested.style.display="none"
event.srcElement.style.listStyleImage="url(fold.gif)"
}
}
}document.onclick=change//-->
</script>
</head>
<body>
<ul>
<li id="foldheader">News</li>
<ul id="foldinglist" style="display:none">
<li><a href="http://www.cnn.com">CNN</a></li>
<li><a href="http://www.abcnews.com">ABC News</a></li>
<li><a href="http://www.vancouversun.com">Vancouver Sun</a></li>
</ul> <li id="foldheader">Games</li>
<ul id="foldinglist" style="display:none">
<li><a href="http://www.gamespot.com">GameSpot</a></li>
<li><a href="http://www.happypuppy.com">Happy Puppy</a></li>
<li><a href="http://www.gamecenter.com">Game Center</a></li>
</ul> <li id="foldheader">Software</li>
<ul id="foldinglist" style="display:none">
<li><a href="http://www.download.com">outer 1</a></li>
<li><a href="http://www.hotfiles.com">outer 2</a></li>
<li id="foldheader">Nested</li>
<ul id="foldinglist" style="display:none">
<li><a href="http://www.windows95.com">nested 1</a></li>
<li><a href="http://www.shareware.com">nested 2</a></li>
</ul>
<li><a href="http://www.windows95.com">outer 3</a></li>
<li><a href="http://www.shareware.com">outer 4</a></li>
</ul>
</ul>
</body>