解决方案 »
- 我做的第一个JQuery图片切换,希望大家多多指教。
- 100分求jquery绑定ajax代码!先谢谢了啊!
- 关与跨域传值的问题
- 我的电脑为什么不支持关闭IE窗口的对象?
- preventDefault()阻止被点击的链接,但不阻止这个子节点的链接,请教怎么写呢?
- 如何通过javascript从 框架页 向 父框架 跳转?
- 如何判断一个表单是否提交?
- window.print()中 print()有参数来设定页眉、页脚么
- 如何在客户端用Javascript验证上船图片的格式?
- dwz文件上传
- 新手求援:web开发页面显示一个不知名的错?
- 请问下 我做了弹窗 里面调用iframe 百度地图 为什么地图不显示呢
<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>
在a.html中点击任务流程之后跳转的b.html页面中,任务流程和对应的内容是显示的这个是a.html页面中的
<li>
<div class="foot_L"> <a href="<{$url_back_to_offers}>&type=-9#step" target="_blank"> </a> </div>
<div class="foot_R"> <a href="<{$url_back_to_offers}>&type=-9#step" target="_blank"> </a>
<p>教你如何完成任务</p>
</div>
</li>
<li>
<div class="foot_L how_L"> <a href="<{$url_back_to_offers}>&type=-9#problem" target="_blank"> </a> </div>
<div class="foot_R how_R"> <a href="<{$url_back_to_offers}>&type=-9#problem" target="_blank"> </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>
//a.html#2
var hash=window.location.hash;
alert(hash.split('#')[1]);//2
}
hash=(!window.location.hash)?"#search":window.location.hash;
window.location.hash=hash;
//调整地址栏地址,使前进、后退按钮能使用
switch(hash){
case "1":
//显示任务流程
break;
case "2":
//常见问题
break;
case "3":
//相关链接
break;
}