<!--tabs 选项卡--><h1>tabs 选项卡</h1><!--tabs 选项卡:动态添加选项卡--><p style="margin-bottom:10px"> <a href="#" class="easyui-linkbutton" onclick="addTabB('google','http://www.google.com')">google</a> <a href="#" class="easyui-linkbutton" onclick="addTabB('jquery','http://jquery.com/')">jquery</a> <a href="#" class="easyui-linkbutton" onclick="addTabB('easyui','http://jeasyui.com/')">easyui</a></p>
<!--tabs 选项卡定义-->
<p id='tabsId' class="easyui-tabs" style="width:500px;
height:250px;
"> <p title="Tab1" style="padding:20px;
display:none;
"> tab1 </p> <p title="Tab2" data-options="closable:true" style="overflow:auto;
padding:20px;
display:none;
"> tab2 </p> <p title="Tab3" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;
display:none;
"> tab3 </p> </p>
//动态添加选项卡方法function addTab(title, url) {
if ($('#tt').tabs('exists', title)) {
$('#tt').tabs('select', title);
}
else {
var content = '<iframe scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;
height:100%;
"></iframe>';
$('#tt').tabs('add', {
title:title, content:content, closable:true }
);
}
}以上就是js中tabs 选项卡的操作 的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号