本帖最后由 leo9921 于 2010-09-03 16:06:32 编辑

解决方案 »

  1.   

    可以用lacation取当前URL的某个参数   传给对应tab实现高亮   
      

  2.   

    这样写的话鼠标滑过会显示"javascript:newLocation()",我要求显示"index.html",不知还有没更好的办法,或是我代码有误.
    <html>
    <head>
    <script type="text/javascript">
    function currLocation()
    {
    alert(window.location)
    }
    function newLocation()
    {
    window.location.href="/index.html"
    }
    </script>
    </head>
    <body>
    <a id="#1" onClick="c(1)" href="javascript:newLocation()"  class="tabB1">首页</a>
    </body>
    </html>