日期:2014-05-17  浏览次数:20605 次

求助:要个导航栏的代码
要求:导航栏每个按纽都用背景图片修饰,当鼠标经过是显示其他背景图片。谢谢各位

------解决方案--------------------
HTML code
 <HTML> 
<HEAD>
<TITLE>top </TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i <a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i <a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i <(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
.STYLE1 {color: #FF00FF}
.STYLE2 {font-size: 12px}
-->
</style>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/head1_2.gif','images/head1_3.gif','images/head1_4.gif','images/head1_5.gif','images/head1_6.gif','images/head1_7.gif','images/head1_8.gif','images/head1_9.gif','images/head1_10.gif','images/head1_11.gif')">
<!-- ImageReady Slices (首页 改版.psd) -->
<TABLE WIDTH=777 BORDER=0 align=center CELLPADDING=0 CELLSPACING=0 >
<TR>
<TD height="131" COLSPAN=10 align="right" valign="middle" background="images/index_02.gif"> <table width="288" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="159" height="28">&nbsp; </td>
      <td width="95"> <span class="STYLE2">[ <span class="STYLE1" style="CURSOR: hand" onClick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.flvsh.com');">设为首页 </span>] </span> </td>
      <td width="34">&nbsp; </td>
    </tr>
    <tr>
      <td height="22">&nbsp; </td>
      <td> <span class="STYLE2">[ <span class="STYLE1" style="CURSOR: hand" title="蓝波湾—贵州IT技术专区" onClick="window.external.addFavorite('http://www.flvsh.com','蓝波湾—贵州IT技术专区')">收藏本站 </span>] </span> </td>
      <td>&nbsp; </td>
    </tr>