如何制作下拉导航菜单 就是onmouse事件控制div显示隐藏 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head></head><body><SCRIPT language=JavaScript>function MM_findObj(n, d) { //v4.0var p,i,x;if(!d) d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);if(!x && document.getElementById) x=document.getElementById(n); return x;}function MM_showHideLayers() { //v3.0var i,p,v,obj,args=MM_showHideLayers.arguments;for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }obj.visibility=v; }}//showhidelayerfunction mOvr(src, cOvr) {if (!src.contains(event.fromElement)) {src.style.cursor = "default";src.bgColor = cOvr;}}function mOut(src, cOut) {if (!src.contains(event.toElement)) {src.style.cursor = "default";src.bgColor = cOut;}}//changetdcolor</SCRIPT> <TABLE border=1 cellPadding=1 cellSpacing=1 width="100"> <TBODY> <TR align=middle class=dmenu> <TD> <DIV id=menu01 style="POSITION: absolute"> <DIV id=sub onmouseout="MM_showHideLayers('sub','','hide')" onmouseover="MM_showHideLayers('sub','','show')" style="HEIGHT: 30px; LEFT: -7px; POSITION: absolute; TOP: 12px; VISIBILITY: hidden; WIDTH: 90px; Z-INDEX: 11"> <TABLE bgColor=#3c8830 border=0 cellPadding=1 cellSpacing=1 width=228> <TBODY> <TR bgColor=#a5db97> <TD align=right> <TABLE border=0 cellPadding=4 cellSpacing=1 class=46C92F width=222> <COLGROUP span=3> <COL width="33%"> <COL width="33%"> <COL width="34%"></COLGROUP> <TBODY> <TR bgColor=#fafef4> <TD><A class=pt03 href="">新闻时事</A></TD> <TD><A class=pt03 href="">体育竞技</A></TD> <TD><A class=pt03 href="">体彩足彩</A></TD></TR> <TR bgColor=#fafef4> <TD><A class=pt03 href="">移动股市</A></TD> <TD><A class=pt03 href="">影视娱乐</A></TD> <TD><A class=pt03 href="">每日笑话</A></TD></TR> <TR bgColor=#fafef4> <TD><A class=pt03 href="">星座预测</A></TD> <TD><A class=pt03 href="">生活教育</A></TD> <TD><A class=pt03 href="">电视节目</A></TD></TR> <TR bgColor=#fafef4> <TD><A class=pt03 href="">天气预报</A></TD> <TD><A class=pt03 href="">英语课堂</A></TD> <TD><A class=pt03 href="">脑筋急转弯</A></TD></TR> <TR bgColor=#fafef4> <TD><A class=pt03 href="http://www.baron.com.cn/javascript/dao/sub_xl.php">心理测试</A></TD> <TD><A class=pt03 href="http://www.baron.com.cn/javascript/dao/sub_whitedew.php">白领专区</A></TD> <TD><A class=pt03 href="http://www.baron.com.cn/javascript/dao/sub_eurfootball.php">欧洲足坛</A></TD></TR> <TR bgColor=#fafef4> <TD><A class=pt03 href="">招聘信息</A></TD> <TD><A class=pt03 href="">彩信新闻</A></TD> <TD><A class=pt03 href="">保健养生</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></DIV><A class=menu href="" onmouseout="MM_showHideLayers('yycq','','hide','logo','','hide','ring','','hide','sub','','hide','mo','','hide','brand','','hide','feature','','hide','product','','hide','help','','hide')" onmouseover="MM_showHideLayers('http://www.baron.com.cn/javascript/dao/yycq','','hide','logo','','hide','ring','','hide','sub','','show','mo','','hide','brand','','hide','feature','','hide','product','','hide','help','','hide')">订阅</A> </TD> <TD> <DIV id=menu02 style="POSITION: absolute"> <DIV id=mo onmouseout="MM_showHideLayers('mo','','hide')" onmouseover="MM_showHideLayers('mo','','show')" style="HEIGHT: 30px; LEFT: -7px; POSITION: absolute; TOP: 12px; VISIBILITY: hidden; WIDTH: 90px; Z-INDEX: 12"> <TABLE bgColor=#3c8830 border=0 cellPadding=1 cellSpacing=1 width=190> <TBODY> <TR bgColor=#a5db97> <TD align=right> <TABLE border=0 cellPadding=4 cellSpacing=1 class=46C92F width=184> <COLGROUP span=2> <COL width="55%"> <COL width="45%"></COLGROUP> <TBODY> <TR bgColor=#fafef4> <TD><A class=pt03 href="" target=_blank>资讯大全</A></TD> <TD><A class=pt03 href="" target=_blank>股票资讯</A></TD></TR> <TR bgColor=#fafef4> <TD><A class=pt03 href="">短语/图片/铃声</A></TD> <TD><A class=pt03 href="">生活服务</A></TD></TR> <TR bgColor=#fafef4> <TD><A class=pt03 href="">游戏测试</A></TD> <TD><A class=pt03 href="">点播帮助</A></TD></TR> <TR bgColor=#fafef4> <TD><A class=pt03 href="">纵横短信</A></TD> <TD><A class=pt03 href="">霸王短信</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></DIV><A class=menu href="http://www.baron.com.cn/javascript/dao/mo/" onmouseout="MM_showHideLayers('yycq','','hide','logo','','hide','ring','','hide','sub','','hide','mo','','hide','brand','','hide','feature','','hide','product','','hide','help','','hide')" onmouseover="MM_showHideLayers('http://www.baron.com.cn/javascript/dao/yycq','','hide','logo','','hide','ring','','hide','sub','','hide','mo','','show','brand','','hide','feature','','hide','product','','hide','help','','hide')">点播</A> </TD> </TR></TBODY></TABLE></body> http://topic.csdn.net/u/20080526/15/f7eb5d6a-eacf-4046-bfdb-c4164a828903.html看看这个,我网上看到的 JavaScript中的ContextMenu的问题 (event || window).returnValue = "aaa"为何弹出两次确认对话框? 在js里边想把一个alter弹出框改为弹出一个表格样式的网页或对话框,请前辈指点!小弟先感谢了! 一个初级的JS变量作用域问题 textarea 怎么做到部分内容只读? 关于跨域的问题 请问如何实现微软左部的导航菜单那样的效果呢? javascript 防止页面刷新 点击空白地方DIV消失 为什么IE下没有效果 文字颜色 图片滚动显示背景问题 菜鸟求个JS求和的问题
<head>
</head>
<body>
<SCRIPT language=JavaScript>
function MM_findObj(n, d) { //v4.0
var p,i,x;if(!d) d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }}
//showhidelayerfunction mOvr(src, cOvr)
{if (!src.contains(event.fromElement)) {src.style.cursor = "default";src.bgColor = cOvr;}}
function mOut(src, cOut)
{if (!src.contains(event.toElement)) {src.style.cursor = "default";src.bgColor = cOut;}}
//changetdcolor
</SCRIPT>
<TABLE border=1 cellPadding=1 cellSpacing=1 width="100">
<TBODY>
<TR align=middle class=dmenu>
<TD>
<DIV id=menu01 style="POSITION: absolute">
<DIV id=sub onmouseout="MM_showHideLayers('sub','','hide')"
onmouseover="MM_showHideLayers('sub','','show')"
style="HEIGHT: 30px; LEFT: -7px; POSITION: absolute; TOP: 12px; VISIBILITY: hidden; WIDTH: 90px; Z-INDEX: 11">
<TABLE bgColor=#3c8830 border=0 cellPadding=1 cellSpacing=1
width=228>
<TBODY>
<TR bgColor=#a5db97>
<TD align=right>
<TABLE border=0 cellPadding=4 cellSpacing=1 class=46C92F
width=222>
<COLGROUP span=3>
<COL width="33%">
<COL width="33%">
<COL width="34%"></COLGROUP>
<TBODY>
<TR bgColor=#fafef4>
<TD><A class=pt03 href="">新闻时事</A></TD>
<TD><A class=pt03 href="">体育竞技</A></TD>
<TD><A class=pt03 href="">体彩足彩</A></TD></TR>
<TR bgColor=#fafef4>
<TD><A class=pt03 href="">移动股市</A></TD>
<TD><A class=pt03 href="">影视娱乐</A></TD>
<TD><A class=pt03 href="">每日笑话</A></TD></TR>
<TR bgColor=#fafef4>
<TD><A class=pt03 href="">星座预测</A></TD>
<TD><A class=pt03 href="">生活教育</A></TD>
<TD><A class=pt03 href="">电视节目</A></TD></TR>
<TR bgColor=#fafef4>
<TD><A class=pt03 href="">天气预报</A></TD>
<TD><A class=pt03 href="">英语课堂</A></TD>
<TD><A class=pt03 href="">脑筋急转弯</A></TD></TR>
<TR bgColor=#fafef4>
<TD><A class=pt03 href="http://www.baron.com.cn/javascript/dao/sub_xl.php">心理测试</A></TD>
<TD><A class=pt03 href="http://www.baron.com.cn/javascript/dao/sub_whitedew.php">白领专区</A></TD>
<TD><A class=pt03 href="http://www.baron.com.cn/javascript/dao/sub_eurfootball.php">欧洲足坛</A></TD></TR>
<TR bgColor=#fafef4>
<TD><A class=pt03 href="">招聘信息</A></TD>
<TD><A class=pt03 href="">彩信新闻</A></TD>
<TD><A class=pt03 href="">保健养生</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></DIV><A class=menu href="" onmouseout="MM_showHideLayers('yycq','','hide','logo','','hide','ring','','hide','sub','','hide','mo','','hide','brand','','hide','feature','','hide','product','','hide','help','','hide')" onmouseover="MM_showHideLayers('http://www.baron.com.cn/javascript/dao/yycq','','hide','logo','','hide','ring','','hide','sub','','show','mo','','hide','brand','','hide','feature','','hide','product','','hide','help','','hide')">订阅</A>
</TD>
<TD>
<DIV id=menu02 style="POSITION: absolute">
<DIV id=mo onmouseout="MM_showHideLayers('mo','','hide')"
onmouseover="MM_showHideLayers('mo','','show')"
style="HEIGHT: 30px; LEFT: -7px; POSITION: absolute; TOP: 12px; VISIBILITY: hidden; WIDTH: 90px; Z-INDEX: 12">
<TABLE bgColor=#3c8830 border=0 cellPadding=1 cellSpacing=1
width=190>
<TBODY>
<TR bgColor=#a5db97>
<TD align=right>
<TABLE border=0 cellPadding=4 cellSpacing=1 class=46C92F
width=184>
<COLGROUP span=2>
<COL width="55%">
<COL width="45%"></COLGROUP>
<TBODY>
<TR bgColor=#fafef4>
<TD><A class=pt03 href="" target=_blank>资讯大全</A></TD>
<TD><A class=pt03 href="" target=_blank>股票资讯</A></TD></TR>
<TR bgColor=#fafef4>
<TD><A class=pt03 href="">短语/图片/铃声</A></TD>
<TD><A class=pt03 href="">生活服务</A></TD></TR>
<TR bgColor=#fafef4>
<TD><A class=pt03 href="">游戏测试</A></TD>
<TD><A class=pt03 href="">点播帮助</A></TD></TR>
<TR bgColor=#fafef4>
<TD><A class=pt03 href="">纵横短信</A></TD>
<TD><A class=pt03 href="">霸王短信</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></DIV><A class=menu href="http://www.baron.com.cn/javascript/dao/mo/" onmouseout="MM_showHideLayers('yycq','','hide','logo','','hide','ring','','hide','sub','','hide','mo','','hide','brand','','hide','feature','','hide','product','','hide','help','','hide')" onmouseover="MM_showHideLayers('http://www.baron.com.cn/javascript/dao/yycq','','hide','logo','','hide','ring','','hide','sub','','hide','mo','','show','brand','','hide','feature','','hide','product','','hide','help','','hide')">点播</A>
</TD>
</TR></TBODY></TABLE></body>
看看这个,我网上看到的