📄 dhtml
字号:
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; Charset=gb2312">
<META name="GENERATOR" content="网络程序员伴侣-Lshdic 2002">
<STYLE>
a{text-Decoration:none;}
a:hover{color:red;text-Decoration:underline}
td{font-size:12px}
</STYLE>
</HEAD>
<BODY alink='red' vlink='#6772CD' link='#6772CD' style='margin:1;'>
<table width='770' align=center cellspacing=0 cellpadding=0><tr><Td>
<!--以下为左方导航表-->
<TABLE cellspacing=0 cellpadding=0 width=135 align='left' bgcolor='#BBE2F5' rules=none frame=lhs bordercolordark=white bordercolorlight=dddddd border=1>
<TR>
<Td valign=top height=722 id=myid2><img src='image/right.gif'> <A href='newuser.asp' style='color:Red'>注册会员</a> <a href='olduser.asp' style='color:red'>会员登陆</a><p>
注册会员:1171人<br>
当前在线:2人<br>
今日访问:6次<br>
总共访问:245次
<p> <br>用户:<a href='ismy.asp?user=Lshdic' target='_blank'>Lshdic</a><br>
<img src='image/user25.gif' width='60' height='60' align=left>
经验:20307<br>
身份:版主<br>
<a href='exitbbs.asp?user=lshdic' style='color:green'>退出登陆</a><br>
<a href='xiougai.asp' style='color:green'>修改档案</a><p> <br>
┏论坛栏目┓<A href='../index.asp' style='color:red'>首页</a> <A href='index.asp' style='color:red'>论坛</a><p>
<TABLE cellspacing=0 cellpadding=2 width=100% id=instrtab><tr><Td>
1:<A href='page.asp?dex=网页版面美工设计' style='color:1210dd'>网页版面美工设计</a><p>
2:<a href='page.asp?dex=网页前台脚本编程' style='color:1210dd'>网页前台脚本编程</a><p>
3:<a href='page.asp?dex=网页后台脚本编程' style='color:1210dd'>网页后台脚本编程</a><p>
4:<a href='page.asp?dex=Xml与Net时代编程' style='color:1210dd'>Xml与Net时代编程</a><p>
5:<a href='page.asp?dex=软件开发交流论坛' style='color:1210dd'>软件开发交流论坛</a><p>
6:<a href='page.asp?dex=讨论区及其他学术' style='color:1210dd'>讨论区及其他学术</a><p align=left>┏会员特有权利┓___<p style='line-height:1.5'>
1:<a href='instr.asp' style='color:A36424;font-weight:bold'>搜索所有帖子</a><br>
2:<a href='instr2.asp?page=1&strs=lshdic&rad1=作者&dex=网页版面美工设计,网页前台脚本编程,网页后台脚本编程,网站站长经验交流,软件开发交流论坛,蓝丽论坛站务讨论' style='color:A36424;font-weight:bold'>我提出过的问题</a><br>
3:<a href='duanxiaoxi.asp?page=1' style='color:A36424;font-weight:bold'>收发短消息</a><br>
4:<a href='jinghua.asp?dex=网页前台脚本编程' style='color:A36424;font-weight:bold'>显示本版精华贴OK</a><br>
5:<a href='../wenzhang.asp' style='color:A36424;font-weight:bold'>技术文章库</a><br>
6:<a href='../friendabout.asp' style='color:A36424;font-weight:bold' target='_blank'>论坛会员档案库</a><p>
<a href='http://www.lshdic.com/bbs'>©蓝丽论坛v<font color=red>2003.1</font></a>
</td></tr></table>
</td></TR></TABLE>
<script>
function window.onload(){
try{
myid2.height=window.document.body.scrollHeight}
catch(e){}
}
</script>
<TITLE>Js+Dhtml:关于蓝丽网站网页导航栏(旧版)制作的文章 -- Lshdic程序员论坛</TITLE>
<!--以下为右方内容表-->
<TABLE cellspacing=0 cellpadding=3 width=635 bordercolordark='white' bordercolorlight='black' cellspacing=0 cellpadding=0 border=1 rules=none frame=rhs>
<tr><td bgcolor=#6F81BC style='color:white' colspan=2><img src='image/redfile.gif' width=13 height=13> <b>主题</b>:Js+Dhtml:关于蓝丽网站网页导航栏(旧版)制作的文章 来自<a href='page.asp?dex=网页前台脚本编程' style='color:yellow'>网页前台脚本编程</a>,阅读96次
</td></tr><Tr bgcolor=eeeeee>
<Td width=120 align=center valign=top> <br>
<img src='image/user25.gif' height=90 width=90>
<br>楼主:<a href='ismy.asp?user=lshdic' target="_blank" title='点击查看lshdic的资料'>lshdic</a><br>经验:20307点<br><font color=#6772CD>神终级:宿命传说</font><br>02-11-14 13:46:42<br>
给作者<a href='duanxiaoxi.asp?emailto=Lshdic'>发送短消息</a><br><p><a href='userboos.asp?dex=网页前台脚本编程&areyou=编辑&myclass=396&isdex=true&page=1'>编辑</a> <a href='userboos.asp?dex=网页前台脚本编程&areyou=锁定&myclass=396&isdex=true&page=1'>锁定</a> <a href='userboos.asp?dex=网页前台脚本编程&areyou=转移&myclass=396&isdex=true'>转移</a> <a href=javascript:if(confirm('确实要删除该贴吗?'))location='userboos.asp?dex=网页前台脚本编程&areyou=删除&myclass=396&isdex=true'>删除</a>
<script>
function openw(values){
open1=window.open('','','resizable=1,scrollbars=1,menubar=0,toolbar=0,directories=0');
open1.document.open()
open1.document.write(values);
open1.document.close()
}
</script>
</td><td valign=top name=tds1>
<div style='word-Break:break-all;overflow:auto;width:490;line-height:1.5;border:1 solid orange;padding:5;border-top:0;border-right:0' id=htmdiv1>
<HTML><br><HEAD><br><META http-equiv="Content-Type" content="text/html; Charset=gb2312"><br><META name="GENERATOR" content="网络程序员伴侣-Lshdic 2002"><br><META NAME ="KEYWORDS" CONTENT="lshdic,蓝丽网,html,css,javascript,vbscript,asp,sql,dhtml,vml,php,jsp,xml,vrml,vb,vc,delphi,开发,电脑,网络,编程,程序员,下载,软件,网页,编辑器,技术论坛"><br><STYLE><br>a{text-Decoration:none;}<br>a:hover{color:blue}<br>td{font-size:12px;color:555555}<br>.a1{font-size:14px}<br></STYLE><br></HEAD><br><BODY vlink=#6772CD link='#6772CD'><br><base href='<a href='http://www.lshdic.com/' target='_blank'>http://www.lshdic.com/</a>'><br><TABLE cellspacing=0 cellpadding=1 width=770 align=center style='border-width:0' bgcolor='#BBE2F5' frame=below rules=none bordercolordark=white bordercolorlight=dddddd id=menutd> <!--最外围表格--><br><TR align=right><td height=25 align=left id=menutd1> <!--存放回首页的TD单元格--><br><a href='index.asp' style='font-size:13px'>回首页</a><br></td><br><!--以下就开始着手构建菜单了--><br><Td><br><a href='#' style='font-size:13px' onmouseover="movese('FlashMtv 经典音乐|DJ舞曲 经典电影','happy.asp|happy2.asp')">娱乐视听</a> &nbsp;<br><a href='wenzhang.asp' style='font-size:13px' onmouseover="movese('网络编程语言**Html**Css**JavaScript**VbScript**Dhtml**Vml**ActiveX**Asp**Php**Jsp**Sql+Ado**Xml+*.net**其他网络技术|软件编程语言**Basic+VB**C语言+VC+CB**Java+VJ+J2EE**PB+Delphi**VFP+汇编|-|其他非编程学术|蓝丽所有网友问题|查找所有技术文章','被屏蔽网址**wenzhang.asp?str=Html<font style=display:none>Dhtml&page=1**wenzhang.asp?str=Css&page=1**wenzhang.asp?str=JavaScript/Js<font style=display:none>Jsp&page=1**wenzhang.asp?str=Vbs&page=1**wenzhang.asp?str=Dhtml&page=1**wenzhang.asp?str=Vml&page=1**wenzhang.asp?str=ActiveX&page=1**wenzhang.asp?str=Asp&page=1**wenzhang.asp?str=Php&page=1**wenzhang.asp?str=Jsp&page=1**wenzhang.asp?str=Sql/Ado&page=1**wenzhang.asp?str=Xml/.Net/Xsl&page=1**wenzhang.asp?str=Fso/Wsh/Htc/正则/Object/iis/pws/Vrml&page=1|被屏蔽网址**wenzhang.asp?str=Basic/VB<font style=display:none>Vbs&page=1**wenzhang.asp?str=C语言/VC/CB&page=1**wenzhang.asp?str=VJ/J2EE/Java<font style=display:none>JavaScript&page=1**wenzhang.asp?str=PB/Delphi&page=1**wenzhang.asp?str=VF/汇编&page=1||wenzhang.asp?str=英语/注册表:/微软/驱动程序/硬件/黑客/加密/解密/攻击/防御/入侵/红客/外语/业界/理论/趋势/破解/工作/程序员/设计师/新闻/社会/讲座/病毒&page=1|wenzhang.asp?str=请问/问题/难题/请教/帮忙/帮助/帮忙/sos/help/解决/有没有/帮帮/救命/救救/急/教我/愁/谁能/能不/可不可/行不/怎么/提问/怎样/才能/能让&page=1|bbs/instr.asp')">技术文章</a> &nbsp;<br><a href='download.asp' style='font-size:13px' onmouseover="movese('编程类工具软件|电子教程|编程素材','download.asp?screen=工具软件&page=1|download.asp?screen=电子教程&page=1|download.asp?screen=编程素材&page=1')">下载中心</a> &nbsp;<br><a href='editweb.asp' style='font-size:13px' onmouseover="movese('进入网页编辑中心|下载编辑网页v2版','editweb.asp|download2.asp?id=48')">编辑网页</a> &nbsp;<br><a href='editdhtml.asp' style='font-size:13px' onmouseover="movese('进入程序编辑中心|下载编写程序v2版','editdhtml.asp|download2.asp?id=92',1000)">编写程序</a> &nbsp;<br><a href='lshdic2002.asp' title='进行注册,领取Lshdic200X软件序列号的地方' style='font-size:13px' onmouseover="movese('查看领取Lshdic序列号|注册购买Lshdic序列号|注册购买流程简介','lshdic2002.asp|lshdic2002one.asp|lshdic2002help1.asp')">Lshdic</a> &nbsp; <br><a href='bbs2.asp' style='font-size:13px' onmouseover="movese('查看客户所有留言|签写新留言','bbs2.asp|bbs2fatie.asp')">留言我们</a> &nbsp; <br><a href='bbs/index.asp' style='font-weight:bold' onmouseover="movese('网页版面美工设计|网页前台脚本编程|网页后台脚本编程|Xml与Net时代编程|软件开发交流论坛|讨论区及其他学术|-|会员登陆注册入口','bbs/page.asp?dex=网页版面美工设计|bbs/page.asp?dex=网页前台脚本编程|bbs/page.asp?dex=网页后台脚本编程|bbs/page.asp?dex=Xml与Net时代编程|bbs/page.asp?dex=软件开发交流论坛|bbs/page.asp?dex=讨论区及其他学术||bbs/olduser.asp')">程式交流论坛</a> &nbsp; <br></td></tr></TABLE><br><script><br>var cleartime=1<br>function movese(menustr,menuhref){ //添加一级菜单的函数<br>happydiv.style.display='';happydiv2.style.display='none';if(cleartime!=1)clearTimeout(cleartime)<br>happydiv.style.posLeft=menutd.offsetLeft+menutd1.offsetWidth+event.srcElement.offsetLeft;happydiv.style.posTop=menutd.offsetTop+menutd.offsetHeight<br>for(i=0;happydiv.rows.length;i++)happydiv.deleteRow() //清除一级菜单中所有单元格<br>str1=menustr.split('|');str2=menuhref.split('|')<br>for(i=0;i<str1.length;i++){ //循环给一级菜单添加单元格<br>tdstr=happydiv.insertRow().insertCell()<br>if(str1[i].indexOf('**')==-1){ //如果数据可构成二级菜单则。。。<br>if(str1[i]!="-")tdstr.innerHTML="<a href='"+str2[i]+"'>"+str1[i]+"</a>";else tdstr.innerHTML="<hr size=1 color=#8BB4D9>"<br>}else{ //如果数据不可构成二级菜单则。。。<br>str3=str1[i].split('**')<br>tdstr.innerHTML="<font onmouseover=movese2('"+str1[i]+"','"+str2[i].replace(/</g,"lshdicstr1").replace(/ /g,"lshdicstr2").replace(/>/g,"lshdicstr3")+"')>"+str3[0]+" →</font>" //由于字符中有与HTML冲突的字符因而替换<br>}}<br>cleartime=setTimeout('happydiv.style.display="none";happydiv2.style.display="none"',2000) //2秒后关闭所有菜单<br>}<br>function movese2(menustr2,menuhref2){ //添加二级菜单的函数<br>happydiv2.style.display='';if(cleartime!=1)clearTimeout(cleartime)<br>happydiv2.style.posLeft=happydiv.offsetLeft+happydiv.offsetWidth;<br>temptop1=event.srcElement.parentElement.parentElement<br>happydiv2.style.posTop=happydiv.offsetTop+(temptop1.offsetHeight*temptop1.rowIndex) //二级菜单定位<br>for(i=0;happydiv2.rows.length;i++)happydiv2.deleteRow()<br>str3=menustr2.split('**');str4=menuhref2.split('**')<br>for(i=1;i<str3.length;i++){<br>tdstr2=happydiv2.insertRow().insertCell()<br>tdstr2.innerHTML="<a href='"+str4[i].replace(/lshdicstr1/g,'<').replace(/lshdicstr2/g,' ').replace(/lshdicstr3/g,'>')+"'>"+str3[i]+"</a>" //由于字符中有与HTML冲突的字符因而替换<br>}<br>cleartime=setTimeout('happydiv.style.display="none";happydiv2.style.display="none"',2000) //2秒后关闭所有菜单<br>}<br>function over1(){ //鼠标移动到菜单单元格移动处加上边框和背景色<br>if(event.srcElement.tagName=="TD"){event.srcElement.bgColor='eeeeee';event.srcElement.style.border='1 solid black'}else if(event.srcElement.tagName=="A"||event.srcElement.tagName=="FONT"){event.srcElement.parentElement.bgColor='eeeeee';event.srcElement.parentElement.style.border='1 solid black'}<br>}<br>function out1(){ //鼠标在菜单单元格移动处将边框和背景去掉<br>if(event.srcElement.tagName=="TD"){event.srcElement.bgColor='';event.srcElement.style.border=''}else if(event.srcElement.tagName=="A"||event.srcElement.tagName=="FONT"){event.srcElement.parentElement.bgColor='';event.srcElement.parentElement.style.border=''}<br>}<br>function click1(){ //菜单内单元格单击事件<br>if(event.srcElement.tagName=="TD")location.href=event.srcElement.all.tags('A')(0).href<br>}<br>function document.onclick(){ //页面单击关闭所有菜单<br>happydiv.style.display='none';happydiv2.style.display='none'<br>}<br>function window.onerror(){<br>return true //以外扩展以外错误取消<br>}<br></script><br><table id=happydiv style='position:absolute;z-index:5;display:none;cursor:hand;' bgcolor=#BBE2F5 onmouseover="over1();clearTimeout(cleartime)" onmouseout="out1();temp1='none';cleartime=setTimeout('happydiv.style.display=temp1;happydiv2.style.display=temp1',2000)" onclick=click1()><br><tr><Td></td></tr><br></table><!--大类菜单表格结束,大类表格调用了over(),out1(),click1()函数--><br><table id=happydiv2 style='position:absolute;z-index:5;display:none;cursor:hand;' bgcolor=#BBE2F5 onmouseover="over1();clearTimeout(cleartime)" onmouseout="out1();temp1='none';cleartime=setTimeout('happydiv.style.display=temp1;happydiv2.style.display=temp1',2000)" onclick=click1()><br><tr><Td></td></tr><br></table><!--小类菜单表格结束,小类表格也调用了over(),out1(),click1()函数--><br><br><br><br><br><!--<br>菜单完成了,将一下两个重要函数<br><br>movese(menustr,menuhref)<br><br>构建一级菜单的函数,可写成movese("栏目一|栏目二|栏目三**栏目三之一**栏目三之二","lm1.asp|lm2.asp|首个被屏蔽的网址.asp**lm3z1.asp**lm3z2.asp")<br><br>movese2(menustr2,menuhref2)<br><br>构建二级菜单的函数,这个必须在一级菜单中生成了请看<br><br>tdstr.innerHTML="<font onmouseover=movese2('"+str1[i]+"','"+str2[i].replace(/</g,"lshdicstr1").replace(/ /g,"lshdicstr2").replace(/>/g,"lshdicstr3")+"')>"+str3[0]+" →</font>"<br><br>好了,整个菜单就是这样的,<br>-->
<p align=right style='color:gray'>蓝丽程序员论坛收录 http://www.lshdic.com</div><br>
<input type=button value='运行在浏览器查看' style='background-color:eeeeee;border:1 cccccc solid;width:120' onclick="openw(htmdiv1.innerText)"><input type=button value='快速编辑' style='background-color:eeeeee;border:1 cccccc solid;' onclick="try{htmdiv1.contentEditable=true}catch(e){alert('您的浏览器版本过低无法使用该功能')}"> <font color=aaaaaa>注意:运行在浏览器查看时请注意含有恶意程序</a>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -