解决方案 »
- 这个难题,外国的问答站不细致深入了解其中含义,就关闭了,像国内精英请教吧
- 调试javascript的工具
- 子窗口如何关闭时刷新父窗口而保留父窗口表单的值
- 帮忙看下这个脚本,为什么加一行就不能运行了
- 关于firefox和Chrome中form对象的elements属性
- Composition.document.body.innerHTML和Composition.document.body.innerText的一个问题。
- 怎样获得图片焦点的坐标值?
- 鼠标如何定位到文本框????
- 如何用javascript修改<input type='file' />元素的文件列表?
- 如何明确对象类型?
- 前端很弱无奈必须要写,请问:jquery函数传参数的问题
- struts2带验证码的登陆action
没有,就是简单的tab1有个按钮,点击按钮跳到tab2,就行了
就是用了这个,现在我想实现从tab1里的按钮直接跳转到tab2,怎么实现啊
<html>
<head>
<meta charset="UTF-8">
<title>Basic Tabs - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
<link rel="stylesheet" type="text/css" href="../demo.css">
<script type="text/javascript" src="../../jquery.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
<h2>Basic Tabs</h2>
<div class="demo-info">
<div class="demo-tip icon-tip"></div>
<div>Click tab strip to swap tab panel content.</div>
</div>
<div style="margin:10px 0;"></div>
<div class="easyui-tabs" id="tt" style="width:700px;height:250px">
<div title="About" style="padding:10px">
<p style="font-size:14px">jQuery EasyUI framework help you build your web page easily.</p>
<ul>
<li>easyui is a collection of user-interface plugin based on jQuery.</li>
<li>easyui provides essential functionality for building modem, interactive, javascript applications.</li>
<li>using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML up.</li>
<li>complete framework for HTML5 web page.</li>
<li>easyui save your time and scales while developing your products.</li>
<li>easyui is very easy but powerful.</li>
</ul>
<p><input type="button" value="switch" onclick="$('#tt').tabs('select', 'My Documents');" /></p>
</div>
<div title="My Documents" style="padding:10px">
<ul class="easyui-tree" data-options="url:'../tabs/tree_data1.json',animate:true"></ul>
</div>
<div title="Help" data-options="iconCls:'icon-help',closable:true" style="padding:10px">
This is the help content.
</div>
</div>
</body>
</html>
用的是1.3.3在tab的示例basic.html的基础上改的
<html>
<head>
<meta charset="UTF-8">
<title>Basic Tabs - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
<link rel="stylesheet" type="text/css" href="../demo.css">
<script type="text/javascript" src="../../jquery.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
<h2>Basic Tabs</h2>
<div class="demo-info">
<div class="demo-tip icon-tip"></div>
<div>Click tab strip to swap tab panel content.</div>
</div>
<div style="margin:10px 0;"></div>
<div class="easyui-tabs" id="tt" style="width:700px;height:250px">
<div title="About" style="padding:10px">
<p style="font-size:14px">jQuery EasyUI framework help you build your web page easily.</p>
<ul>
<li>easyui is a collection of user-interface plugin based on jQuery.</li>
<li>easyui provides essential functionality for building modem, interactive, javascript applications.</li>
<li>using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML up.</li>
<li>complete framework for HTML5 web page.</li>
<li>easyui save your time and scales while developing your products.</li>
<li>easyui is very easy but powerful.</li>
</ul>
<p><input type="button" value="switch" onclick="$('#tt').tabs('select', 'My Documents');" /></p>
</div>
<div title="My Documents" style="padding:10px">
<ul class="easyui-tree" data-options="url:'../tabs/tree_data1.json',animate:true"></ul>
</div>
<div title="Help" data-options="iconCls:'icon-help',closable:true" style="padding:10px">
This is the help content.
</div>
</div>
</body>
</html>
用的是1.3.3在tab的示例basic.html的基础上改的就是静态代码,没什么用啊
你的tab数量不可预知?tab标题不可预知
你的tab数量不可预知?tab标题不可预知
这些不能再html里面写吗?????
re:什么意思?不能硬编码,可以用js创建呀
假设按钮id为‘btn’,tab是以click来实现:
(1)用trigger,方法类似于:$('#btn').click(function(){
$(tab2).trigger('click')
})(2)直接启动类似于:$('#btn').click(function(){
$(tab2).click();
})