1、tabs_iframe.jsp

<%--
Document : tabs
Created on : 2015-2-28, 14:44:02
Author : liyulin lyl010991@126.com
--%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>tabs demo</title>
<link href="/JqueryDemo/js/jquery-ui-1.11.4.custom/jquery-ui.css" rel="stylesheet">
<script src="/JqueryDemo/js/jquery-ui-1.11.4.custom/external/jquery/jquery.js"></script>
<script src="/JqueryDemo/js/jquery-ui-1.11.4.custom/jquery-ui.js"></script>
<script>
function WindowSize(inSize) {
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
inSize=(inSize=="w")?myWidth:inSize;
inSize=(inSize=="h")?myHeight:inSize;
return inSize;
}
</script>
</head>
<body>
<div id="tabs">
<ul>
<li><a href="#tabs-1">tab-1</a></li>
<li><a href="#tabs-2">tab-2</a></li>
<li><a href="#tabs-3">tab-3</a></li>
</ul>
<iframe width="100%" style="padding:0px;" frameborder="no" id="tabs-1" src="/JqueryDemo/demo/tabs/iframe1.jsp"></iframe>
<iframe width="100%" style="padding:0px;" frameborder="no" id="tabs-2" src="/JqueryDemo/demo/tabs/iframe2.jsp"></iframe>
<iframe width="100%" style="padding:0px;" frameborder="no" id="tabs-3" src="/JqueryDemo/demo/tabs/iframe3.jsp"></iframe>
</div>
</body>
</html>
<script>
$(function(){
$( "#tabs" ).tabs();
});
function adjustX(){
$("#tabs-1,#tabs-2,#tabs-3").css({
"height":WindowSize("h")-80
});
}
adjustX();
window.onresize=adjustX;
</script>

2、iframe2.jsp

<%--
Document : iframe2
Created on : 2015-2-28, 18:21:13
Author : liyulin lyl010991@126.com
--%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>iframe2</title>
<style>
div{
text-align: center;
margin-top: 100px;
font-size: 30px;
font-weight: bold;
}
</style>
</head>
<body>
<div>
iframe21111
<button onclick="parent.$('a[href=#tabs-1]').click();">tab1</button>
<button onclick="parent.$('a[href=#tabs-3]').click();">tab3</button>
</div>
</body>
</html>

总结:

1、从tab2跳转到tab1:

parent.$('a[href=#tabs-1]').click();

2、从tab2跳转到tab3:

parent.$('a[href=#tabs-3]').click();


jquery ui tab跳转的更多相关文章

  1. [转]Hide or Remove jquery ui tab based on condition

    本文转自:http://stackoverflow.com/questions/19132970/hide-or-remove-jquery-ui-tab-based-on-condition 问: ...

  2. jquery ui tab标签

    <!DOCTYPE html> <html> <head> <title>tab</title> <style type=" ...

  3. jquery ui 怎么实现tab标签切换效果

    1.效果图 2.HTML 代码 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> &l ...

  4. ASP.NET jQuery 随笔 使用jQuery UI的Autocomplete方法实现文本框的自动搜索填充功能

    首先当然是去下载JQuery UI ,这里这里是下载地址http://jqueryui.com/ 第一步是点击这里 第二步选择你想要下载的主题进行下载 我这里是选择的cupertino主题包 点击圆圈 ...

  5. Jquery UI

    jQuery UI简介 jQuery UI包含了许多维持状态的小部件(Widget),因此,它与典型的 jQuery 插件使用模式略有不同.所有的 jQuery UI 小部件(Widget)使用相同的 ...

  6. 解决Select2控件不能在jQuery UI Dialog中不能搜索的bug

    本文使用博客园Markdown编辑器进行编辑 1.问题呈现 项目中使用了jQuery UI的Dialog控件,一般用来处理需要提示用户输入或操作的简单页面.逻辑是修改一个广告的图片和标题. 效果截图如 ...

  7. Struts2 JQuery UI常用插件

    一.什么是插件 ①是遵循一定接口规范编写的程序 ②是原有系统平台功能的扩展和补充 ③只能运行在规定的系统平台下,而不能单独运行 注:由于jQuery插件是基于jQuery脚本库的扩展,所以所有jQue ...

  8. 大熊君JavaScript插件化开发------(实战篇之DXJ UI ------ Tab功能扩展完结版)

    一,开篇分析 Hi,大家好!大熊君又和大家见面了,还记得上一篇文章吗.主要讲述了一个“Tab”插件是如何组织代码以及实现的”,以及过程化设计与面向对象思想设计相结合的方式是 如何设计一个插件的,两种方 ...

  9. 大熊君JavaScript插件化开发------(实战篇之DXJ UI ------ Tab)

    一,开篇分析 Hi,大家好!大熊君又和大家见面了,还记得前两篇文章吗.主要讲述了以“jQuery的方式如何开发插件”,以及过程化设计与面向对象思想设计相结合的方式是 如何设计一个插件的,两种方式各有利 ...

随机推荐

  1. wIndows phone 7 解析Html数据

    原文:wIndows phone 7 解析Html数据 在我的上一篇文章中我介绍了windows phone 7的gb2312解码, http://www.cnblogs.com/qingci/arc ...

  2. UIApplicationsharedApplication的常用使用方法

    下面是这个类的一些功能: 1.设置icon上的数字图标 //设置主界面icon上的数字图标,在2.0中引进, 缺省为0 [UIApplicationsharedApplication].applica ...

  3. Oracle SQL Lesson (2) - 限制和排序数据

    重建scott用户@?/rdbms/admin/utlsampl.sql@--执行?--$ORACLE_HOME 字符区分大小写:SELECT last_name, job_id, departmen ...

  4. ZOJ--3631--Watashi&#39;s BG【枚举】

    链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4777 题意:有n天,告诉你每天的花费,别人给你一笔资金m,你自己也有一部 ...

  5. bridge pattern

     10.5 桥接模式总结 桥接模式是设计Java虚拟机和实现JDBC等驱动程序的核心模式之一,应用较为广泛.在软件开发中如果一个类或一个系统有多个变化维度时,都可以尝试使用桥接模式对其进行设计.桥接模 ...

  6. 重新想象 Windows 8 Store Apps (8) - 控件之 WebView

    原文:重新想象 Windows 8 Store Apps (8) - 控件之 WebView [源码下载] 重新想象 Windows 8 Store Apps (8) - 控件之 WebView 作者 ...

  7. ios ios7 取消控制拉升

    //推断是否ios7 取消控制拉升 if ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0) { self.edgesFo ...

  8. Linux 没有 my.cnf 解决方案文件完全我自己的整个教程很多口才

    我看过好多关于Linux下没有my.cnf的博客,都是什么rmp安装没有my.cnf文件啊,然后什么两个方法啊,我就无语了,大家要是知道就不会查资料了,你们敢不敢负责点?说具体点?有的说从 /usr/ ...

  9. yum简介(转)

    yum是什么yum = Yellow dog Updater, Modified 主要功能是更方便的添加/删除/更新RPM包. 它能自动解决包的倚赖性问题. 它能便于管理大量系统的更新问题yum特点可 ...

  10. 离PACKET_INp获取信息acket data

         于Floodlight模块假设要packet in消息,就对对应的消息类型进行监听就可以.然后在receive方法中就能够操纵这个上传上来的packet_in.      关键代码:   E ...