解决方案 »

  1.   

    地址栏传递参数,然后再跳转到的页面判断即可 ?type=1  根据参数判断哪些显示,那么隐藏
      

  2.   

    window.location.hash这个可以跳转吗?怎么实现?
      

  3.   

    跳转页面 代码window.location='b.html’window.location.hash //这个是取地址栏中#后面的值
      

  4.   

    a.html<html>
    <head>
     
    </head>
    <body>
    <a href="b.html?index=1">任务流程</a>
    <a href="b.html?index=2">常见问题</a>
    <a href="b.html?index=3">相关链接</a><script type="text/javascript">
     
      </script>
    </body>
    </html>b.html
    <!DOCTYPE html PUBliC "-//W3C//dtD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/dtD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>测试</title>  <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>  <script type="text/javascript">  window.onload = function(){
        var url = location.search; //获取url中"?"符后的字串
        if (url.indexOf("?") != -1) {
          var str = url.substr(1);
          var index = str.split("=")[1] - 1;
          
            document.getElementsByTagName('a')[index].style.display = 'block';
          
        }
      }
      </script><body>
    <a href="b.html?index=1" style="display:none">任务流程</a>
    <a href="b.html?index=2" style="display:none">常见问题</a>
    <a href="b.html?index=3" style="display:none">相关链接</a></body>
    </html>
      

  5.   

    就是要取#后面的值,来实现
    在a.html中点击任务流程之后跳转的b.html页面中,任务流程和对应的内容是显示的这个是a.html页面中的
    <li>
    <div class="foot_L"> <a href="<{$url_back_to_offers}>&type=-9#step" target="_blank">&nbsp;</a> </div>
    <div class="foot_R"> <a href="<{$url_back_to_offers}>&type=-9#step" target="_blank">&nbsp;</a>
    <p>教你如何完成任务</p>
    </div>
    </li>
    <li>
    <div class="foot_L how_L"> <a href="<{$url_back_to_offers}>&type=-9#problem" target="_blank">&nbsp;</a> </div>
    <div class="foot_R how_R"> <a href="<{$url_back_to_offers}>&type=-9#problem" target="_blank">&nbsp;</a>
    <p>为你解惑答疑</p>
    </div>
    </li>
    b.html<li class="li_cur"><a href="#problem">常见问题</a></li>
    <li><a href="#step">任务流程</a></li>
    <li><a href="#link">关于我们</a></li>
      

  6.   

    用window.location.hash这个怎么实现呢
      

  7.   

    window.onload=function(){
    //a.html#2
    var hash=window.location.hash;
    alert(hash.split('#')[1]);//2
    }
      

  8.   

    var hash; 
    hash=(!window.location.hash)?"#search":window.location.hash; 
    window.location.hash=hash; 
      //调整地址栏地址,使前进、后退按钮能使用 
    switch(hash){   
    case "1":  
       //显示任务流程
        break;    
    case "2":    
       //常见问题
        break;    
    case "3":  
       //相关链接
        break;    
         
    }