引用 | 编辑
detecti41258
2005-08-08 11:35 |
楼主
▼ |
||
x0
【类型】其他【版本】1.3.6 请问怎么制作下拉式选单,我有试过1.3.6专用的下拉式选单,但common.js会错误。 关于以下的代码换成别的代码会错误! <body vlink=333333 link=333333 alink=333333 leftmargin=Ɔ' rightmargin=Ɔ' topmargin=Ɔ' bottommargin=Ɔ'> 替换为 <body vlink=333333 link=333333 alink=333333 leftmargin="0" rightmargin=Ɔ' topmargin="0" bottommargin=Ɔ' marginwidth="0" marginheight="0" onmousemove=HideMenu();> <script language="JavaScript" src="require/common.js"></script> <div id=menuDiv style="visibility: hidden; width: 0px; position: absolute; height: 0px"></div> 以下是common.js的内容! (帮我看看哪里有错误)复制程式 /****************************************************************************** Crossday Discuz! Board - Common Modules for Discuz! Modified by: Crossday Studio ([url]http://crossday.com[/url]) Based upon: [url]http://www.cnzzz.com[/url] *******************************************************************************/ tPopWait=30; showPopStep=20; popOpacity=80; sPop=null; curShow=null; tFadeOut=null; tFadeIn=null; tFadeWaiting=null; document.write("<style type='text/css'id='defaultPopStyle'>"); document.write(".cPopText { font-family: Verdana, Tahoma; background-color: #DDEEFF; border: 1px #666666 solid; font-size: 11px; padding-right: 6px; padding-left: 6px; Height: 20px; padding-top: 4px; padding-bottom: 3px; filter: Alpha(Opacity=0)}"); document.write("</style>"); document.write("<div id='popLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>"); function showPopupText(){ var o=event.srcElement; MouseX=event.x; MouseY=event.y; if(o.alt!=null && o.alt!="") { o.pop=o.alt;o.alt="" } if(o.title!=null && o.title!=""){ o.pop=o.title;o.title="" } if(o.pop) { o.pop=o.pop.replace("\n","<br>"); o.pop=o.pop.replace("\n","<br>"); } if(o.pop!=sPop) { sPop=o.pop; clearTimeout(curShow); clearTimeout(tFadeOut); clearTimeout(tFadeIn); clearTimeout(tFadeWaiting); if(sPop==null || sPop=="") { popLayer.innerHTML=""; popLayer.style.filter="Alpha()"; popLayer.filters.Alpha.opacity=0; } else { if(o.dyclass!=null) popStyle=o.dyclass else popStyle="cPopText"; curShow=setTimeout("showIt()",tPopWait); } } } function showIt() { popLayer.className=popStyle; popLayer.innerHTML=sPop; popWidth=popLayer.clientWidth; popHeight=popLayer.clientHeight; if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24 else popLeftAdjust=0; if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24 else popTopAdjust=0; popLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust; popLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust; popLayer.style.filter="Alpha(Opacity=0)"; fadeOut(); } function fadeOut(){ if(popLayer.filters.Alpha.opacity<popOpacity) { popLayer.filters.Alpha.opacity+=showPopStep; tFadeOut=setTimeout("fadeOut()",1); } } function ctlent(obj) { if((event.ctrlKey && window.event.keyCode == 13) || (event.altKey && window.event.keyCode == 83)) { if ((this.document.input.postcopy) && (this.document.input.postcopy.checked == true)) { var tempval=eval(this.document.input.message) tempval.focus(); tempval.select(); therange=tempval.createTextRange(); therange.execCommand("Copy"); } //if(validate(this.document.input)) this.document.input.submit(); } } function checkall(form) { for(var i = 0;i < form.elements.length; i++) { var e = form.elements[i]; if (e.name != 'chkall') { e.checked = form.chkall.checked; } } } function findobj(n, d) { 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); } return x; } function copycode(obj) { var rng = document.body.createTextRange(); rng.moveToElementText(obj); rng.scrollIntoView(); rng.select(); rng.execCommand("Copy"); rng.collapse(false); } document.onmouseover=showPopupText; <!-- var h; var l; var t; var isvisible; function HideMenu() { var mX; var mY; var vDiv; if (isvisible == true) { vDiv = document.all("menuDiv"); mX = window.event.clientX + document.body.scrollLeft; mY = window.event.clientY + document.body.scrollTop; if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){ vDiv.style.visibility = "hidden"; isvisible = false; } } } function ShowMenu(vMnuCode) { vSrc = window.event.srcElement; vMnuCode = "<DIV style='PADDING-RIGHT: 6px; FILTER: shadow(color=#5F5F5F,direction=120); PADDING-BOTTOM: 6px;width:98px'><table border=0 cellspacing=1 cellpadding=4 bgcolor=#76AE00 style='line-height:18px' width=ྞ' align='left'><tr bgcolor='#FFFFFF'><td width=14 background=images/menubg.gif> </td><td>" + vMnuCode + "</td></tr></table></div>"; h = vSrc.offsetHeight + 0; l = vSrc.offsetLeft + 0; t = vSrc.offsetTop + h; vParent = vSrc.offsetParent; while (vParent.tagName.toUpperCase() != "BODY") { l += vParent.offsetLeft; t += vParent.offsetTop; vParent = vParent.offsetParent; } menuDiv.innerHTML = vMnuCode; menuDiv.style.top = t; menuDiv.style.left = l; menuDiv.style.visibility = "visible"; isvisible = true; } //--> PS:请勿发表笔战的回文 x0
|
引用 | 编辑
detecti41258
2005-08-08 12:41 |
2楼
▲ ▼ |
下面是引用晨秋于2005-08-8 12:35发表的 : 是网页发生错误,目前已知是common.js的问题。 因为common.js是由Discuz插件转换过来的,应该是没有修改好。 x1 |
引用 | 编辑
达人村惟禄
2005-08-08 12:47 |
3楼
▲ ▼ |
试试看这个common.js
复制程式 tPopWait=30; showPopStep=20; popOpacity=80; sPop=null; curShow=null; tFadeOut=null; tFadeIn=null; tFadeWaiting=null; document.write("<style type='text/css'id='defaultPopStyle'>"); document.write(".cPopText { font-family: Verdana, Tahoma; background-color: #DDEEFF; border: 1px #666666 solid; font-size: 11px; padding-right: 6px; padding-left: 6px; Height: 20px; padding-top: 4px; padding-bottom: 3px; filter: Alpha(Opacity=0)}"); document.write("</style>"); document.write("<div id='popLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>"); function showPopupText(){ var o=event.srcElement; MouseX=event.x; MouseY=event.y; if(o.alt!=null && o.alt!="") { o.pop=o.alt;o.alt="" } if(o.title!=null && o.title!=""){ o.pop=o.title;o.title="" } if(o.pop) { o.pop=o.pop.replace("\n","<br>"); o.pop=o.pop.replace("\n","<br>"); } if(o.pop!=sPop) { sPop=o.pop; clearTimeout(curShow); clearTimeout(tFadeOut); clearTimeout(tFadeIn); clearTimeout(tFadeWaiting); if(sPop==null || sPop=="") { popLayer.innerHTML=""; popLayer.style.filter="Alpha()"; popLayer.filters.Alpha.opacity=0; } else { if(o.dyclass!=null) popStyle=o.dyclass else popStyle="cPopText"; curShow=setTimeout("showIt()",tPopWait); } } } function showIt() { popLayer.className=popStyle; popLayer.innerHTML=sPop; popWidth=popLayer.clientWidth; popHeight=popLayer.clientHeight; if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24 else popLeftAdjust=0; if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24 else popTopAdjust=0; popLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust; popLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust; popLayer.style.filter="Alpha(Opacity=0)"; fadeOut(); } function fadeOut(){ if(popLayer.filters.Alpha.opacity<popOpacity) { popLayer.filters.Alpha.opacity+=showPopStep; tFadeOut=setTimeout("fadeOut()",1); } } function ctlent(obj) { if((event.ctrlKey && window.event.keyCode == 13) || (event.altKey && window.event.keyCode == 83)) { if ((this.document.input.postcopy) && (this.document.input.postcopy.checked == true)) { var tempval=eval(this.document.input.message) tempval.focus(); tempval.select(); therange=tempval.createTextRange(); therange.execCommand("Copy"); } //if(validate(this.document.input)) this.document.input.submit(); } } function checkall(form) { for(var i = 0;i < form.elements.length; i++) { var e = form.elements[i]; if (e.name != 'chkall') { e.checked = form.chkall.checked; } } } function findobj(n, d) { 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); } return x; } function copycode(obj) { var rng = document.body.createTextRange(); rng.moveToElementText(obj); rng.scrollIntoView(); rng.select(); rng.execCommand("Copy"); rng.collapse(false); } <!-- var h; var l; var t; var isvisible; function HideMenu() { var mX; var mY; var vDiv; if (isvisible == true) { vDiv = document.all("menuDiv"); mX = window.event.clientX + document.body.scrollLeft;//检索到鼠标移动到的X坐标+横向滚动条位置 mY = window.event.clientY + document.body.scrollTop;//检索到鼠标移动到的Y坐标+纵向滚动条位置 if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){//简单的说法就是比较鼠标坐标值与子菜单坐标值 vDiv.style.visibility = "hidden";//只要满足以上任一条件,子菜单就隐藏 isvisible = false;//返回一个布尔值后结束 } } } function ShowMenu(vMnuCode) { vSrc = window.event.srcElement;//检索事件的对象,在这里就是检索到鼠标移到对象上而找到主菜单元素 vMnuCode = "<DIV style='PADDING-RIGHT: 6px; FILTER: shadow(color=#CCCCCC,direction=120); PADDING-BOTTOM: 6px;width:98px'><table border=0 cellspacing=1 cellpadding=4 bgcolor=#698CC3 style='line-height:18px' width=ྞ' align='left'><tr bgcolor='#ffffff'><td>" + vMnuCode + "</td></tr></table></div>";//得到子菜单的HTML文本,在这里可以定义子菜单的外观 h = vSrc.offsetHeight + 4;//主菜单本身高度+主菜单元素本身高度+4,可以通过调整此数字控制主菜单和子菜单的间距,此值很重要,因为在HideMenu()中要调用,如果不要此值,就不能在t后面添加,否则会使菜单显示不正常 l = vSrc.offsetLeft + 0;//主菜单的X坐标-10,可以通过调整此数字控制主菜单和子菜单的缩进 t = vSrc.offsetTop + h;//主菜单的Y坐标 vParent = vSrc.offsetParent;//定义元素的坐标系统 while (vParent.tagName.toUpperCase() != "BODY")//在vParent元素的标记符是大写BODY之前循环,因为在后面设置innerHTML属性时,不能在文档加载时设置 { l += vParent.offsetLeft;//+=左运算数加右运算数,和赋值给左运算数 t += vParent.offsetTop; vParent = vParent.offsetParent;//重新定义元素的坐标系统 } menuDiv.innerHTML = vMnuCode;//interHTML:元素包含的HTML文本。可以用指定的HTML文本替换元素的内容,在这里就是利用它把子菜单的HTML文本加入menuDIV对象的标记符内。 menuDiv.style.top = t;//设置top值 menuDiv.style.left = l;//设置left值 menuDiv.style.visibility = "visible";//设置显示 isvisible = true;//返回一个布鲁值,以便HideMenu()调用 } //--> document.onmouseover=showPopupText; x1 |
引用 | 编辑
达人村惟禄
2005-08-08 12:51 |
4楼
▲ ▼ |
如果是 其他版本
要在header顶部加以下代码: <script language="JavaScript" src="require/common.js"></script> x0 |
引用 | 编辑
detecti41258
2005-08-08 13:07 |
5楼
▲ ▼ |
还不能使用,以下的代码也有问题,换上去之后出现乱码。
一般选单增加法: 举例: 在 header.htm 的统计设定下拉菜单 $list1="<a href=\"\" onmouseover=\"ShowMenu('<a href=stats.php?type=week>星期流量</a><br><a href=stats.php?type=hour>时段流量</a><br><a href=stats.php?type=agent>客户软体</a><br><a href=stats.php?type=threads>主题排行</a><br><a href=stats.php?type=member>会员排行</a>')\">论坛统计</a>"; x0 |
引用 | 编辑
达人村惟禄
2005-08-08 13:57 |
6楼
▲ ▼ |
在header顶部加以下代码:
<script language="JavaScript" src="require/common.js"></script> 找到: <body vlink='#333333' link='#333333'> 替换成: <body vlink='#333333' link='#333333' leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onmousemove=HideMenu();><div id=menuDiv style="visibility: hidden; width: 0px; position: absolute; height: 0px"></div> x0 |
引用 | 编辑
达人村惟禄
2005-08-08 14:13 |
7楼
▲ ▼ |
以下是 替换范例
| <a href=profile.php class=table>控制面板</a> 替换成: | <a href="profile.php" class=table onmouseover="ShowMenu('<a href=profile.php class=table>编辑个人资料</a><br><a href=profile.php?action=show&uid=$winddb[uid] class=table>查看个人资料</a><br><a href=job.php?action=favor class=table>收藏夹</a>')"><font class=table>控制面板</font></a> x0 |
引用 | 编辑
detecti41258
2005-08-08 14:21 |
8楼
▲ ▼ |
还是不行! 在此宣布第一代下拉式选单测试失败!
我不管怎么改,网页都是错误。 x0 |
引用 | 编辑
detecti41258
2005-08-08 14:35 |
10楼
▲ ▼ |
算了! 我连这个都没办法了,我也不用开站了。
所有方法都试过了 x0 |
引用 | 编辑
aa
2005-08-08 14:40 |
11楼
▲ ▼ |
我的 common.js
复制程式 var h; var l; var t; var isvisible; function hidemenu(evt) { var mX; var mY; var vDiv; if (isvisible == true) { if (!evt) var evt = window.event; if (document.all) { vDiv = document.all("menuDiv"); } else { vDiv = document.getElementById("menuDiv"); } vDivWidth = (vDiv.offsetWidth > 0) ? vDiv.offsetWidth : 104; vDivHeight = (vDiv.offsetHeight > 0) ? vDiv.offsetHeight : 203; if (evt.pageX || evt.pageY) { mX = evt.pageX; mY = evt.pageY; } else if (evt.clientX || evt.clientY) { mX = evt.clientX + document.body.scrollLeft; mY = evt.clientY + document.body.scrollTop; } if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDivWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDivHeight)){ vDiv.style.visibility = "hidden"; isvisible = false; } //alert(mX+','+mY+','+vDiv.style.left+','+vDiv.style.top+','+vDiv.offsetWidth+','+vDiv.offsetHeight+','+h); } } function showmenu(evt,vMnuCode) { var vDiv; if(evt == null) evt = window.event; // For IE var vSrc = evt.srcElement? evt.srcElement : evt.target; // IE使用srcElement, 而Firefox使用target vMnuCode = "<DIV style='PADDING-RIGHT: 6px; FILTER: shadow(color=#485A7A,direction=120); PADDING-BOTTOM: 6px;width:98px'><table border=0 cellspacing=1 cellpadding=4 bgcolor=#376594 style='line-height:17px' width=ྞ' align='center'><tr bgcolor='#FFFFFF'><td width=14 background='images/menubg.gif' style='background-color: #4C85B2; background-repeat: no-repeat ;line-height:15px ; color: #FFFFFF' width=ྞ' align='center' valign='top'><img src='' height=5 width=1><br>数<br>位<br>男<br>女</td><td bgcolor='E9EEF3'>" + vMnuCode + "</td></tr></table></div>"; h = vSrc.offsetHeight + 0; l = vSrc.offsetLeft + 0; t = vSrc.offsetTop + h; vParent = vSrc.offsetParent; while (vParent.tagName.toUpperCase() != "BODY") { l += vParent.offsetLeft; t += vParent.offsetTop; vParent = vParent.offsetParent; } vDiv=document.getElementById("menuDiv") vDiv.innerHTML = vMnuCode; vDiv.style.top = t; vDiv.style.left = l; vDiv.style.visibility = "visible"; isvisible = true; } 然后 header.htm 中要用,请自已运用修改,重点在 showmenu 的参数 复制程式 <body vlink=333333 link=333333 alink=333333 leftmargin=Ɔ' rightmargin=Ɔ' topmargin=Ɖ' bottommargin=Ɔ' onmousemove=hidemenu(event)> 复制程式 | <a href='faq.php?faqjob=4#6' onmouseover="showmenu(event,'<a href=faq.php?faqjob=4#6>赞助本站</a><br><a href=shopping.php>形象商品</a><br><a href=shopping.php?x=2#1>马克杯</a><br>----------<br><a href=video.php>视讯聊天</a><br><a href=http://0949.gg.to target=_blank>国际节费</a>')" class=table>赞助</a> x1 |
引用 | 编辑
detecti41258
2005-08-08 17:43 |
12楼
▲ ▼ |
站长发布的方法,非常的成功。
非常感谢能完成史上PHPWind1.3.6的下拉式选单! x0 |
引用 | 编辑
detecti41258
2005-08-08 18:33 |
13楼
▲ ▼ |
网页又发错误,谁能帮我看看原因是在哪里。
common.js 复制程式 var h; var l; var t; var isvisible; function hidemenu(evt) { var mX; var mY; var vDiv; if (isvisible == true) { if (!evt) var evt = window.event; if (document.all) { vDiv = document.all("menuDiv"); } else { vDiv = document.getElementById("menuDiv"); } vDivWidth = (vDiv.offsetWidth > 0) ? vDiv.offsetWidth : 104; vDivHeight = (vDiv.offsetHeight > 0) ? vDiv.offsetHeight : 203; if (evt.pageX || evt.pageY) { mX = evt.pageX; mY = evt.pageY; } else if (evt.clientX || evt.clientY) { mX = evt.clientX + document.body.scrollLeft; mY = evt.clientY + document.body.scrollTop; } if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDivWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDivHeight)){ vDiv.style.visibility = "hidden"; isvisible = false; } //alert(mX+','+mY+','+vDiv.style.left+','+vDiv.style.top+','+vDiv.offsetWidth+','+vDiv.offsetHeight+','+h); } } function showmenu(evt,vMnuCode) { var vDiv; if(evt == null) evt = window.event; // For IE var vSrc = evt.srcElement? evt.srcElement : evt.target; // IE使用srcElement, 而Firefox使用target vMnuCode = "<DIV style='PADDING-RIGHT: 6px; FILTER: shadow(color=#999999,direction=120); PADDING-BOTTOM: 6px;width:98px'><table border=0 cellspacing=1 cellpadding=4 bgcolor=#666666 style='line-height:17px' width=ྞ' align='center'><tr bgcolor='#FFFFFF'><td width=14 background='images/menubg.gif' style='background-color: #666666; background-repeat: no-repeat ;line-height:15px ; color: #FFFFFF' width=ྞ' align='center' valign='top'><img src='' height=5 width=1><br>X<br>X<br>X<br>X</td><td bgcolor='#FFFFFF'>" + vMnuCode + "</td></tr></table></div>"; h = vSrc.offsetHeight + 0; l = vSrc.offsetLeft + 0; t = vSrc.offsetTop + h; vParent = vSrc.offsetParent; while (vParent.tagName.toUpperCase() != "BODY") { l += vParent.offsetLeft; t += vParent.offsetTop; vParent = vParent.offsetParent; } vDiv=document.getElementById("menuDiv") vDiv.innerHTML = vMnuCode; vDiv.style.top = t; vDiv.style.left = l; vDiv.style.visibility = "visible"; isvisible = true; } header.htm 复制程式 <body vlink=333333 link=333333 alink=333333 leftmargin=Ɔ' rightmargin=Ɔ' topmargin=Ɔ' bottommargin=Ɔ' onmousemove=hidemenu(event)> <script language="JavaScript" src="require/common.js"></script> <div id=menuDiv style="visibility: hidden; width: 0px; position: absolute; height: 0px"></div> x1 |
引用 | 编辑
detecti41258
2005-08-08 22:27 |
14楼
▲ |
由于网路上分享的common.js的档案有错误,所以我将已测试成功的1.3.6下拉式选单的制作方法分享出来。
此插件是本论坛站长提供的,在此非常感谢。 1.找 <body vlink=333333 link=333333 alink=333333 leftmargin=Ɔ' rightmargin=Ɔ' topmargin=Ɔ' bottommargin=Ɔ'> 改成 <!----> <script language="JavaScript" src="require/topmenu.js"></script> <body vlink=333333 link=333333 alink=333333 leftmargin=Ɔ' rightmargin=Ɔ' topmargin=Ɔ' bottommargin=Ɔ' onmousemove=hidemenu(event)> <div id=menuDiv style="visibility: hidden; width: 0px; position: absolute; height: 0px"></div> 2.将common.js档案换成topmenu.js档案: 以下是topmenu.js档案的内容! 复制程式 var h; var l; var t; var isvisible; function hidemenu(evt) { var mX; var mY; var vDiv; if (isvisible == true) { if (!evt) var evt = window.event; if (document.all) { vDiv = document.all("menuDiv"); } else { vDiv = document.getElementById("menuDiv"); } vDivWidth = (vDiv.offsetWidth > 0) ? vDiv.offsetWidth : 104; vDivHeight = (vDiv.offsetHeight > 0) ? vDiv.offsetHeight : 203; if (evt.pageX || evt.pageY) { mX = evt.pageX; mY = evt.pageY; } else if (evt.clientX || evt.clientY) { mX = evt.clientX + document.body.scrollLeft; mY = evt.clientY + document.body.scrollTop; } if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDivWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDivHeight)){ vDiv.style.visibility = "hidden"; isvisible = false; } //alert(mX+','+mY+','+vDiv.style.left+','+vDiv.style.top+','+vDiv.offsetWidth+','+vDiv.offsetHeight+','+h); } } function showmenu(evt,vMnuCode) { var vDiv; if(evt == null) evt = window.event; // For IE var vSrc = evt.srcElement? evt.srcElement : evt.target; // IE¨Ï¥ÎsrcElement, ¦ÓFirefox¨Ï¥Îtarget vMnuCode = "<DIV style='PADDING-RIGHT: 6px; FILTER: shadow(color=#485A7A,direction=120); PADDING-BOTTOM: 6px;width:98px'><table border=0 cellspacing=1 cellpadding=4 bgcolor=#376594 style='line-height:17px' width=ྞ' align='center'><tr bgcolor='#FFFFFF'><td width=14 background='images/menubg.gif' style='background-color: #4C85B2; background-repeat: no-repeat ;line-height:15px ; color: #FFFFFF' width=ྞ' align='center' valign='top'><img src='' height=5 width=1><br>¼Æ<br>¦ì<br>¨k<br>¤k</td><td bgcolor='E9EEF3'>" + vMnuCode + "</td></tr></table></div>"; h = vSrc.offsetHeight + 0; l = vSrc.offsetLeft + 0; t = vSrc.offsetTop + h; vParent = vSrc.offsetParent; while (vParent.tagName.toUpperCase() != "BODY") { l += vParent.offsetLeft; t += vParent.offsetTop; vParent = vParent.offsetParent; } vDiv=document.getElementById("menuDiv") vDiv.innerHTML = vMnuCode; vDiv.style.top = t; vDiv.style.left = l; vDiv.style.visibility = "visible"; isvisible = true; } 3.加入选单,以下是范例 复制程式 | <a href='faq.php?faqjob=4#6' onmouseover="showmenu(event,'<a href=faq.php?faqjob=4#6>赞助本站</a><br><a href=shopping.php>形象商品</a><br><a href=shopping.php?x=2#1>马克杯</a><br>----------<br><a href=video.php>视讯聊天</a><br><a href=http://0949.gg.to target=_blank>国际节费</a>')" class=table>赞助</a> x0 |