将网页另存为保存就可看到代码了
主要是一个menu.js
用<SCRIPT language=javaScript src="menu.js"
type=text/javascript></SCRIPT>引入你的网页就行了,menu的内容在JS里的document.write改
主要是一个menu.js
用<SCRIPT language=javaScript src="menu.js"
type=text/javascript></SCRIPT>引入你的网页就行了,menu的内容在JS里的document.write改
解决方案 »
- JSP网页小脚本
- javascript canvas的跨域问题
- 关闭浏览器清除cookie,程序如何写
- appendchild is not function ?
- 怎么让动态下拉框显示在最上层
- 关于梅花雪树型控件(MzTreeView1.0)的一个奇怪现象~~~~~
- 各位JS高手,帮忙看看,这种效果是怎么实现的,急用,多谢了,
- 放在session里面的内容可靠吗?比如登录的用户名,会丢失吗?
- 请问javascript能访问数据库吗(ACCESS)?能的话可以给一段代码参考一下?
- 自学《javascript高级程序设计》持续更新,请大家监督
- 关于飘动的窗口如何处理?急!!
- 点击一个连接时如何能监测到连接失败,而不是转到IE的出错界面。这应该是大家都想解决的问题。进来讨论一下。
#menu { Z-INDEX: 5; LEFT: 180px; VISIBILITY: visible; WIDTH: 18px; POSITION: absolute; TOP: 18px }
#top { Z-INDEX: 5; LEFT: 0px; VISIBILITY: visible; WIDTH: 180px; POSITION: absolute; TOP: 14px }
#screen { Z-INDEX: 5; LEFT: 0px; VISIBILITY: visible; WIDTH: 180px; POSITION: absolute; TOP: 26px }
</STYLE>
<SCRIPT language="javascript">
<!--
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0 if(ie){
document.write('<style type="text/css">')
document.write("#screen {}")
document.write("#screenlinks{filter:Alpha(Opacity=100);}")
document.write("</style>")
} if(ns){
document.write('<style type="text/css">')
document.write("#master {clip:rect(0,150,250,0);}")
document.write("</style>")
} //-->
</SCRIPT>
<SCRIPT language="javascript">
<!--
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0 var master = new Object("element")
master.curLeft = -180; master.curTop = 10;
master.gapLeft = 0; master.gapTop = 0;
master.timer = null; function moveAlong(layerName, paceLeft, paceTop, fromLeft, fromTop){
clearTimeout(eval(layerName).timer) if(eval(layerName).curLeft != fromLeft){
if((Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft)) < paceLeft){eval(layerName).curLeft = fromLeft}
else if(eval(layerName).curLeft < fromLeft){eval(layerName).curLeft = eval(layerName).curLeft + paceLeft}
else if(eval(layerName).curLeft > fromLeft){eval(layerName).curLeft = eval(layerName).curLeft - paceLeft}
if(ie){document.all[layerName].style.left = eval(layerName).curLeft}
if(ns){document[layerName].left = eval(layerName).curLeft}
} if(eval(layerName).curTop != fromTop){
if((Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop)) < paceTop){eval(layerName).curTop = fromTop}
else if(eval(layerName).curTop < fromTop){eval(layerName).curTop = eval(layerName).curTop + paceTop}
else if(eval(layerName).curTop > fromTop){eval(layerName).curTop = eval(layerName).curTop - paceTop}
if(ie){document.all[layerName].style.top = eval(layerName).curTop}
if(ns){document[layerName].top = eval(layerName).curTop}
}
eval(layerName).timer=setTimeout('moveAlong("'+layerName+'",'+paceLeft+','+paceTop+','+fromLeft+','+fromTop+')',30)
} function setPace(layerName, fromLeft, fromTop, motionSpeed){
eval(layerName).gapLeft = (Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft))/motionSpeed
eval(layerName).gapTop = (Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop))/motionSpeed moveAlong(layerName, eval(layerName).gapLeft, eval(layerName).gapTop, fromLeft, fromTop)
} var expandState = 0 function expand(){
if(expandState == 0){setPace("master", 0, 10, 10); if(ie){document.menutop.src = "images/menub.gif"};expandState = 1;}
else{setPace("master", -180, 10, 10); if(ie){document.menutop.src = "images/menu.gif"}; expandState = 0;}
}
//-->
</SCRIPT>
<DIV id="master" style="Z-INDEX: 101">
<DIV id="menu">
<TABLE cellSpacing="0" cellPadding="0" width="21" border="0">
<TBODY>
<TR>
<TD width="100%"><A onfocus="this.blur()" href="javascript:expand()"><IMG height="140" src="images/menu.gif" width="21" border="0" name="menutop"></A></TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<DIV id="top">
<TABLE height="4" cellSpacing="0" cellPadding="0" width="180" border="0">
<TBODY>
<TR>
<TD width="100%"><IMG height="6" src="images/top.gif" width="180" border="0">
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<DIV id="screen">
<table cellSpacing="0" cellPadding="5" width="180" background="images/skins/menu_bk.gif" border="0">
<tr>
<td width="100%">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td width="100%">
<table class="a2" cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td class="a2" width="100%" bgColor="#ffffff"><DIV>
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td width="100%">
<table cellSpacing="0" cellPadding="0" width="100%" bgColor="#808080" border="0">
<tr>
<td width="100%">
<table class="a3" cellSpacing="1" cellPadding="5" width="100%" border="0" height="122">
<tr>
<td class="a3" width="100%" bgColor="#ffffff" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</DIV>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</DIV>
<DIV id="screenlinks"></DIV>
</DIV>
<SCRIPT language="javascript">
<!--
if(ie){var sidemenu = document.all.master;}
if(ns){var sidemenu = document.master;} function FixY(){
if(ie){sidemenu.style.top = document.body.scrollTop+10}
if(ns){sidemenu.top = window.pageYOffset+10}
} setInterval("FixY()",100);
//-->
</SCRIPT>
#menu { Z-INDEX: 5; LEFT: 180px; VISIBILITY: visible; WIDTH: 18px; POSITION: absolute; TOP: 18px }
#top { Z-INDEX: 5; LEFT: 0px; VISIBILITY: visible; WIDTH: 180px; POSITION: absolute; TOP: 14px }
#screen { Z-INDEX: 5; LEFT: 0px; VISIBILITY: visible; WIDTH: 180px; POSITION: absolute; TOP: 26px }
</STYLE>
<SCRIPT language="javascript">
<!--
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0 if(ie){
document.write('<style type="text/css">')
document.write("#screen {}")
document.write("#screenlinks{filter:Alpha(Opacity=100);}")
document.write("</style>")
} if(ns){
document.write('<style type="text/css">')
document.write("#master {clip:rect(0,150,250,0);}")
document.write("</style>")
} //-->
</SCRIPT>
<SCRIPT language="javascript">
<!--
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0 var master = new Object("element")
master.curLeft = -180; master.curTop = 10;
master.gapLeft = 0; master.gapTop = 0;
master.timer = null; function moveAlong(layerName, paceLeft, paceTop, fromLeft, fromTop){
clearTimeout(eval(layerName).timer) if(eval(layerName).curLeft != fromLeft){
if((Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft)) < paceLeft){eval(layerName).curLeft = fromLeft}
else if(eval(layerName).curLeft < fromLeft){eval(layerName).curLeft = eval(layerName).curLeft + paceLeft}
else if(eval(layerName).curLeft > fromLeft){eval(layerName).curLeft = eval(layerName).curLeft - paceLeft}
if(ie){document.all[layerName].style.left = eval(layerName).curLeft}
if(ns){document[layerName].left = eval(layerName).curLeft}
} if(eval(layerName).curTop != fromTop){
if((Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop)) < paceTop){eval(layerName).curTop = fromTop}
else if(eval(layerName).curTop < fromTop){eval(layerName).curTop = eval(layerName).curTop + paceTop}
else if(eval(layerName).curTop > fromTop){eval(layerName).curTop = eval(layerName).curTop - paceTop}
if(ie){document.all[layerName].style.top = eval(layerName).curTop}
if(ns){document[layerName].top = eval(layerName).curTop}
}
eval(layerName).timer=setTimeout('moveAlong("'+layerName+'",'+paceLeft+','+paceTop+','+fromLeft+','+fromTop+')',30)
} function setPace(layerName, fromLeft, fromTop, motionSpeed){
eval(layerName).gapLeft = (Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft))/motionSpeed
eval(layerName).gapTop = (Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop))/motionSpeed moveAlong(layerName, eval(layerName).gapLeft, eval(layerName).gapTop, fromLeft, fromTop)
} var expandState = 0 function expand(){
if(expandState == 0){setPace("master", 0, 10, 10); if(ie){document.menutop.src = "images/menub.gif"};expandState = 1;}
else{setPace("master", -180, 10, 10); if(ie){document.menutop.src = "images/menu.gif"}; expandState = 0;}
}
//-->
</SCRIPT>
<DIV id="master" style="Z-INDEX: 101">
<DIV id="menu">
<TABLE cellSpacing="0" cellPadding="0" width="21" border="0">
<TBODY>
<TR>
<TD width="100%"><A onfocus="this.blur()" href="javascript:expand()"><IMG height="140" src="images/menu.gif" width="21" border="0" name="menutop"></A></TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<DIV id="top">
<TABLE height="4" cellSpacing="0" cellPadding="0" width="180" border="0">
<TBODY>
<TR>
<TD width="100%"><IMG height="6" src="images/top.gif" width="180" border="0">
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<DIV id="screen">
<table cellSpacing="0" cellPadding="5" width="180" background="images/skins/menu_bk.gif" border="0">
<tr>
<td width="100%">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td width="100%">
<table class="a2" cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td class="a2" width="100%" bgColor="#ffffff"><DIV>
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td width="100%">
<table cellSpacing="0" cellPadding="0" width="100%" bgColor="#808080" border="0">
<tr>
<td width="100%">
<table class="a3" cellSpacing="1" cellPadding="5" width="100%" border="0" height="122">
<tr>
<td class="a3" width="100%" bgColor="#ffffff" valign="top">
<a href="http://www.163.com"> 163</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</DIV>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</DIV>
<DIV id="screenlinks"></DIV>
</DIV>
<SCRIPT language="javascript">
<!--
if(ie){var sidemenu = document.all.master;}
if(ns){var sidemenu = document.master;} function FixY(){
if(ie){sidemenu.style.top = document.body.scrollTop+10}
if(ns){sidemenu.top = window.pageYOffset+10}
} setInterval("FixY()",100);
//-->
</SCRIPT>