不用frameset,JS块的人都不热心呀!

解决方案 »

  1.   

    可以把每个页面都加上这个头,如果觉得以后改起来麻烦,可以抽出一个公用的
    <table border="1">
    <tr>
    <td style="background-color:red">游旅
    </td>
    <td onclick=document.location.href='Tricket.aspx'>机票
    </td>
    </tr>
    </table>
    机票的页面内容
    另一个
    <table border="1">
    <tr>
    <td onclick=document.location.href='Travel.aspx'>游旅
    </td>
    <td style="background-color:red">机票
    </td>
    </tr>
    </table>
    游旅的页面内容
      

  2.   

    晕,写反了
    <table border="1">
    <tr>
    <td style="background-color:red">游旅
    </td>
    <td onclick=document.location.href='Tricket.aspx'>机票
    </td>
    </tr>
    </table>
    游旅的页面内容
    另一个
    <table border="1">
    <tr>
    <td onclick=document.location.href='Travel.aspx'>游旅
    </td>
    <td style="background-color:red">机票
    </td>
    </tr>
    </table>
    机票的页面内容
      

  3.   

    <style>
    #nav li{
    float:left;
    background-color:#009966;
    }

    #nav a{
    color:#000000;
    text-decoration:none;
    padding-top:4px;
    display:block;
    width:97px;
    height:22px;
    text-align:center;
    border-left:1px solid white;
    }
    </style> <script>
    function showChange(o){
    var ul=document.getElementById("nav");
    for(i=0;i<ul.childNodes.length;i++){
    if(ul.childNodes[i]==o.parentNode){
    ul.childNodes[i].style.backgroundColor="blue";
    }else{
    ul.childNodes[i].style.backgroundColor="#009966";
    }
    }
    }
    </script> <body>
    <ul id="nav">
    <li><a href="#" onclick="showChange(this)">首页</a></li>
    <li><a href="#" onclick="showChange(this)">旅游</a></li>
    <li><a href="#" onclick="showChange(this)">机票</a></li>
    </ul>
    </body>
    </html>
    我JS不太精,供楼主参考下
      

  4.   

    既然是多个页面你各加一个头好了,也许你是想要一个 tabcontrol
    随便在网上搜一下用 js 实现很 easy 的