jQuery EasyUI 选项卡面板tabs的使用实例讲解分享


1、 对选项卡面板区域 div 设置 class=”easyui-tabs”

2、 对选项卡面板区域添加多个 div,每个 div 就是一个选项卡(每个面板一定设置 title)

3、 设置面板 fit 为 true ,自适应父容器大小

4、 设置选项卡 closable 为 true ,添加可关闭按钮

5、通过超链接,点击后,添加新的选项卡

语法: 页面对象.easyui 插件(方法名, 参数) ;

<!DOCTYPE html> <html>  <head>  <meta charset="UTF-8">  <title>easyui-选项卡面板tabs的使用</title>  <!-- 导入jquery核心类库 -->  <script type="text/javascript" src="../js/jquery-1.8.3.js"></script>  <!-- 导入easyui类库 -->  <link id="easyuiTheme" rel="stylesheet" type="text/css" href="../js/easyui/themes/default/easyui.css" rel="external nofollow" >  <link rel="stylesheet" type="text/css" href="../js/easyui/themes/icon.css" rel="external nofollow" >  <link rel="stylesheet" type="text/css" href="../css/default.css" rel="external nofollow" >  <script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>  <script type="text/javascript">   //页面加载后执行   $(function(){   //对链接绑定点击事件   $("#nwtxxb").click(function(){    //添加一个新的选项卡    $("#mytabs").tabs('add',{    title:'CSDN博客',    content:'学IT,你我他学习吧'    });   });   });  </script>  </head>  <body class="easyui-layout">  <div data-options="region:'north',title:'你我他学习吧-学习Java的好博客!'" style="height:100px"></div>  <div data-options="region:'west',title:'菜单导航'" style="width:200px">   <!--折叠面板-->   <div class="easyui-accordion" data-options="fit:true">   <div data-options="title:'基础菜单'">    <a href="javascript:void(0)" rel="external nofollow" id="nwtxxb">你我他学习吧</a>   </div>   <div data-options="title:'系统菜单'">你我他学习吧</div>   </div>  </div>  <div data-options="region:'center',title:'中部区域'">   <!--选项卡面板-->   <div id="mytabs" class="easyui-tabs" data-options="fit:true">   <div data-options="title:'CSDN博客',closable:true">学Java后台编程,就来你我他学习吧!</div>   <div data-options="title:'博客园',closable:true">学前端开发,就来你我他学习吧!</div>   </div>  </div>  <div data-options="region:'east',title:'东部区域'" style="width:100px"></div>  <div data-options="region:'south',title:'南部区域'" style="height:100px"></div>  </body> </html>

www.dengb.comtruehttps://www.dengb.com/jQuery/1270235.htmlTechArticlejQuery EasyUI 选项卡面板tabs的使用实例讲解 1、 对选项卡面板区域 div 设置 class=”easyui-tabs” 2、 对选项卡面板区域添加多个 div,每个 div 就…

—-想了解更多的jQuery特效教程关注<计算机技术网(www.ctvol.com)!!>

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/jquerytutorial/102130.html

(0)
上一篇 2020年4月27日
下一篇 2020年4月27日

精彩推荐