跳转到另一页面指定选项卡块
来源:互联网 发布:阿里云邮箱登陆界面 编辑:程序博客网 时间:2024/05/22 11:43
b.html代码块
<script> $(function () { var page_url; //初始化URL参数 InitUrlParms = function () { var args = new Object(); var query = location.search.substring(1);//获取查询串 var pairs = query.split("&");//在逗号处断开 for (var i = 0; i < pairs.length; i++) { var pos = pairs[i].indexOf('=');//查找name=value if (pos == -1) continue;//如果没有找到就跳过 var argname = pairs[i].substring(0, pos);//提取name var value = pairs[i].substring(pos + 1);//提取value args[argname] = decodeURIComponent(value);//存为属性 } page_url = args; };//封装好的函数,获取从a.html传来的参数type InitUrlParms(); //tab切换 $('.tabs_box ul li').click(function () { var index = $(this).index(); $(this).addClass('active').siblings().removeClass('active'); $('.news_content>div').eq(index).show().siblings().hide(); }); //底部链接跳转到指定tab块 if (page_url["type"] != null) { var tabIndex = page_url["type"]; } else { var tabIndex = 0; } //显示指定的tab内容 $('.news_content>div').eq(tabIndex).show().siblings().hide(); //tab选项卡高亮 $('.tabs_box ul li').eq(tabIndex).addClass('active').siblings().removeClass('active'); });</script>
a.html代码块:
<div><a href="b.html?type=0">item1</a></div> <div><a href="b.html?type=1">item2</a></div> <div><a href="b.html?type=2">item3</a></div>
0 0
- 跳转到另一页面指定选项卡块
- js如何在指定页面跳转到另一指定页面
- js如何在指定页面跳转到另一指定页面
- 自动跳转到另一页面
- 跳转到指定页面
- 跳转到指定页面
- 【HTML】打开页面时按照指定的URL直接跳转到另一新页面
- 实现几秒后跳转到另一页面
- 实现几秒后跳转到另一页面JS
- 关掉dialog然后跳转到另一页面
- 关掉dialog然后跳转到另一页面
- 客户端跳转到指定页面
- button跳转到指定页面
- 推送跳转到指定页面
- 页面/跳转到指定url
- a标签跳转到另一个页面的特定选项卡
- Jsp从当前页面跳转到另一页面
- 页面倒计时一定时间,实现跳转到另一页面
- firefox浏览器 uploadify 上传插件 HTTP ERROR 403
- Java设计模式之备忘录模式
- Web安全之XSS攻防
- BZOJ 3757 苹果树
- 详解android:scaleType属性
- 跳转到另一页面指定选项卡块
- matplotlib scale 刻度
- java取整的三种情况
- WinDBG 技巧:如何生成Dump 文件(.dump 命令)
- 一致性hash算法解析
- 对日期的相关操作
- Caffe学习:使用pycaffe读取caffemodel参数
- 第三章 使用字符串
- angular.js 错误: Error [$injector:unpr] 原因