zoukankan      html  css  js  c++  java
  • Easyui 中 Tabsr的常用方法

    注:index必须为变量

         tab页从0开始

    //新增一个tab页
    var index = 0;
    $('#tt').tabs('add',{ title: 'Tab'+index, content: '<div style="padding:10px">Content'+index+'</div>', closable: true });

     //关闭第1个tab页

     var index=1;

     $('#tabs').tabs('close', index);

     //选择或显示第1个tab页

     $('#tabs').tabs('select', index);

     //tabs上的tab页数

     var tabs = $('#tt').tabs().tabs('tabs');

     var count=tabs.length;

     //选项卡鼠标经过事件时自动显示tab页

    <script type="text/javascript">
      $(function(){
        var tabs = $('#tt').tabs().tabs('tabs');
        for(var i=0; i<tabs.length; i++){
          tabs[i].panel('options').tab.unbind().bind('mouseenter',{index:i},function(e){
            $('#tt').tabs('select', e.data.index);
          });
        }
      });
    </script>

     
  • 相关阅读:
    web端
    vue 键盘事件keyup/keydoen
    APiCloud
    APiCloud
    对于HTML和XML的理解
    JS 的三种定义变量 var let const
    jQuery
    NodeJS 阻塞/非阻塞
    NodeJs REPL交互式解析器常用命令
    用NodeJS创建一个聊天服务器
  • 原文地址:https://www.cnblogs.com/hailexuexi/p/4894744.html
Copyright © 2011-2022 走看看