jquery ui tab ajax 切换,默认选中第一个(序号为0)
来源:互联网 发布:怎样赢网络棋牌机器人 编辑:程序博客网 时间:2024/05/17 01:02
<script>$(function() {var tabss = $('#tabs').tabs();//[object,object]var selectedTab = tabss.tabs('option', 'selected');if(0==selectedTab){ $.ajax({ url: "<%=basePath %>TopicSectionServlet.serv", type: "post", data: "key=" + name + "&doaction=check", dataType: "json", error:function(){ //dealFail(); alert('fail'); }, success: function (data) { $("#atab2").html("成功-按部门1111"); } });}$("#tabs").tabs({ select: function(event, ui) { var name='5b92ed07-ba11-4d3d-bb6b-f642be25d46a'; var htmlStr = ""; if (ui.index == 0) { $.ajax({ url: "<%=basePath %>TopicSectionServlet.serv", type: "post", data: "key=" + name + "&doaction=check", dataType: "json", error:function(){ //dealFail(); alert('fail'); }, success: function (data) { $("#atab2").html("成功-按部门1111"); } }); } // if (ui.index == 1) { $.ajax({ url: "<%=basePath %>TopicSectionServlet.serv", type: "post", data: "key=" + name + "&doaction=check", dataType: "json", error:function(){ //dealFail(); alert('fail'); }, success: function (data) { $("#btab2").html("成功-按部门2222"); } }); } // if (ui.index == 2) { $.ajax({ url: "<%=basePath %>TopicSectionServlet.serv", type: "post", data: "key=" + name + "&doaction=check", dataType: "json", error:function(){ //dealFail(); alert('fail'); }, success: function (data) { $("#ctab2").html("成功-按部门3333"); } }); } // if (ui.index == 3) { $.ajax({ url: "<%=basePath %>TopicSectionServlet.serv", type: "post", data: "key=" + name + "&doaction=check", dataType: "json", error:function(){ //dealFail(); alert('fail'); }, success: function (data) { $("#dtab2").html("成功-按部门4444"); } }); } // if (ui.index == 4) { $.ajax({ url: "<%=basePath %>TopicSectionServlet.serv", type: "post", data: "key=" + name + "&doaction=check", dataType: "json", error:function(){ //dealFail(); alert('fail'); }, success: function (data) { $("#etab2").html("成功-按部门5555"); } }); } // }});});</script>
//
if (ui.index == 1) {//加载版块数据 $.ajax({ url: "<%=basePath %>TopicServlet.serv", type: "post", data: "key=" + name + "&doaction=statisticsBySectionId", dataType: "json", error:function(){ alert('数据加载失败!'); }, success: function (data) { var len=data.length; //所有版块 $('#sectionName-s').contents().remove(); $('<option >请选择</option>').appendTo('#sectionName-s'); for(i=0;i<len;i++){ $("#sectionName-s").append($('<option value='+data[i].tsb.id+'>'+data[i].tsb.sectionName+'</option>')); } //所有数据 $("#btab2").html("成功-按部门2222"); } }); }
0 0
- jquery ui tab ajax 切换,默认选中第一个(序号为0)
- jquery ui ComboBox默认选中第一个
- jQuery设置下拉框select 默认选中第一个option
- jQuery设置下拉框select 默认选中第一个option
- treeVStab默认选中第一个
- Jquery UI 获取选中的tab Index
- Jquery默认选中单选框radio第一个、选中指定值的单选框
- Jquery ZTree 异步加载默认选中第一个节点下的第一个子节点
- 根据数据动态创建radiobutton,默认选中第一个,并随点击切换碎片
- jquery ui tabs 切换TAB事件 获得当前TAB ID
- UITableView默认选中第一个cell
- easyui tree 默认选中第一个节点
- 默认tableview选中第一个cell
- easyui combobox默认选中第一个
- easyui combobox默认选中第一个
- UITableView默认选中第一个cell
- 默认选中select 第一个option
- jquery EasyUi 添加节点、展开所有节点、默认选中第一个节点
- Ubuntu下通过wine安装SourceInsight
- 类加载机制详解
- java反射
- jQuery弹性滑动导航菜单
- Ajax学习笔记
- jquery ui tab ajax 切换,默认选中第一个(序号为0)
- iOS键盘类型
- 使用highcharts,本处使用了column柱形图,较简单
- 串口驱动之写操作
- 搜索,还是Google吧
- 获取每个月的最后一天的当前日期以及前一个月的当前日期,外加23:59:59
- 链式表的按序号查找
- CodeForces 449 D.Jzzhu and Numbers(状压DP+容斥原理)
- 前台使用js的encodeURIComponent编码后,java解析乱码问题的解决方法