固定的左侧移动导航菜单

来源:互联网 发布:淘宝店铺免费代码 编辑:程序博客网 时间:2024/04/30 07:46

脚本说明: 把如下代码加入区域中 第二步:把中的内容改为:

 

脚本说明:
把如下代码加入<body>区域中
<SCRIPT language=JavaScript>
<!--
IE=document.all
NS=document.layers

hdrFontFamily="Verdana";
hdrFontSize="2";
hdrFontColor="white";
hdrBGColor="#999999";
hdrTextAlign="Center";
linkFontFamily="Verdana";
linkFontSize="1";
linkBGColor="white";
linkOverBGColor="#CCCCCC";
linkTextAlign="Center";
linkTarget="_top";
YOffset=5;
staticYOffset=20;
XOffset="5";
menuWidth="110";
menuBGColor="black";
menuIsStatic="yes";
menuHeader="DHTMLShock";
staticMode="advanced";

lastY = 0;
function makeStatic(mode) {
if (IE) {winY = document.body.scrollTop;var NM=ssm3.style}
if (NS) {winY = window.pageYOffset;var NM=document.ssm3}
if (mode=="smooth") {
if ((IE||NS) && winY!=lastY) {
smooth = .2 * (winY - lastY);
if(smooth > 0) smooth = Math.ceil(smooth);
else smooth = Math.floor(smooth);
if (IE) NM.pixelTop+=smooth;
if (NS) NM.top+=smooth;
lastY = lastY+smooth;}
setTimeout('makeStatic("smooth")', 1)}
else if (mode=="advanced") {
if ((IE||NS) && winY>YOffset-staticYOffset) {
if (IE) {NM.pixelTop=winY+staticYOffset}
if (NS) {NM.top=winY+staticYOffset}}
else {
if (IE) {NM.pixelTop=YOffset}
if (NS) {NM.top=YOffset-7}}
setTimeout('makeStatic("advanced")', 1)}
else {alert('Please choose either the "smooth" or "advanced" static modes!')}}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
//-->
</SCRIPT>
<SCRIPT language=JavaScript1.2>
if (IE) {document.write('<DIV ALIGN="left" ID="ssm3" style="Position:Absolute;Left:'+XOffset+'px;Top:'+YOffset+'px;Z-Index:20;width:'+menuWidth+'px">')}
if (NS) {document.write('<LAYER top="'+YOffset+'" name="ssm3"  left="'+XOffset+'"><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 bgcolor="'+menuBGColor+'"><TR><TD>')}
document.write('<table border="0" cellpadding="0" cellspacing="1" bgcolor="'+menuBGColor+'"><TR><TD bgcolor="'+hdrBGColor+'" ALIGN="'+hdrTextAlign+'"><font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+menuHeader+'</b></font></td></tr><TR><TD><table border="0" cellpadding="0" cellspacing="0" width="'+menuWidth+'">')
function addItem(text, link, target) {
if (!target) {target=linkTarget}
document.write('<TR><TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=/''+linkOverBGColor+'/'" onmouseout="bgColor=/''+linkBGColor+'/'"><ILAYER><LAYER onmouseover="bgColor=/''+linkOverBGColor+'/'" onmouseout="bgColor=/''+linkBGColor+'/'" WIDTH="100%" ALIGN="'+linkTextAlign+'"><P  ALIGN="'+linkTextAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+link+'" target="'+target+'" CLASS="ssm3Items">'+text+'</A> </LAYER></ILAYER></TD></TR>')}
function addHdr(text) {
document.write('</table></td></tr><TR><TD bgcolor="'+hdrBGColor+'" ALIGN="'+hdrTextAlign+'"><font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+text+'</b></font></td></tr><TR><TD><table border="0" cellpadding="0" cellspacing="0" width="'+menuWidth+'">')}

//// Only edit between HERE

addItem('网页特效代码 ', 'http://www.7stk.com/', '');
addItem('精彩网页分享', 'http://www.7stk.com/fine/index.htm', '');
addItem('音乐电台代码', 'http://www.7stk.com/radio/radio.htm', '');
addItem('音乐播放器', 'http://www.7stk.com/music/music.htm', '');
addItem('Flash特效代码', 'http://www.7stk.com/flash/flash.htm', '');
addItem('菜单特效代码', 'http://www.7stk.com/caidan/caidan.htm', '');
addItem('天气预报代码', 'http://www.7stk.com/1/index06.htm', '');

addItem('网页特效代码 ', 'http://www.7stk.com/', '');
addItem('精彩网页分享', 'http://www.7stk.com/fine/index.htm', '');
addItem('音乐电台代码', 'http://www.7stk.com/radio/radio.htm', '');
addItem('音乐播放器', 'http://www.7stk.com/music/music.htm', '');
addItem('Flash特效代码', 'http://www.7stk.com/flash/flash.htm', '');
addItem('菜单特效代码', 'http://www.7stk.com/caidan/caidan.htm', '');
addItem('天气预报代码', 'http://www.7stk.com/1/index06.htm', '');

addItem('网页特效代码 ', 'http://www.7stk.com/', '');
addItem('精彩网页分享', 'http://www.7stk.com/fine/index.htm', '');
addItem('音乐电台代码', 'http://www.7stk.com/radio/radio.htm', '');
addItem('音乐播放器', 'http://www.7stk.com/music/music.htm', '');
addItem('Flash特效代码', 'http://www.7stk.com/flash/flash.htm', '');
addItem('菜单特效代码', 'http://www.7stk.com/caidan/caidan.htm', '');
addItem('天气预报代码', 'http://www.7stk.com/1/index06.htm', '');

//// And HERE!

document.write('</table></TD></TR></table>')

if (IE) {document.write('</DIV>')}
if (NS) {document.write('</TD></TR></table></LAYER>')}
if ((IE||NS) && (menuIsStatic=="yes"&&staticMode)) {makeStatic(staticMode);}</SCRIPT>

 

第二步:把<body>中的内容改为:
<body bgcolor="#fef4d9" onload="MM_displayStatusMsg('DHTMLShock - Electrify your site with free DHTML scripts.');return document.MM_returnValue">