jiufenjian 2011-07-05 14:19
浏览 330
已采纳

JQUERY EASYUI 如何获取TABS的点击对象??

$(document).ready(function () { $('#tt').tabs(); $('#tt').tabs('add', { title: 'tab1 ', closable: true, content: '<iframe scrolling=&quot;yes&quot; frameborder=&quot;0&quot; src=http://topic.csdn.net/u/20110524/17/&quot;Demo-MainFrame01.jsp?type=0&quot; style=&quot;width:100%;height:100%;&quot;></iframe>', selected: true }); $('#tt').tabs('add', { title: ''tab2 ', closable: true, content: '<iframe scrolling=&quot;yes&quot; frameborder=&quot;0&quot; src=http://topic.csdn.net/u/20110524/17/&quot;Demo-MainFrame01.jsp?type=1&quot; style=&quot;width:100%;height:100%;&quot;></iframe>' }); $('#tt').tabs('add', { title: ''tab3', closable: true, content: '<iframe scrolling=&quot;yes&quot; frameborder=&quot;0&quot; src=http://topic.csdn.net/u/20110524/17/&quot;Demo-MainFrame01.jsp?type=1&quot; style=&quot;width:100%;height:100%;&quot;></iframe>' }); });

我想在第一次 点击TAB1时,触发一个事件,刷新TAB1里面的内容,点击第一次TAB2时,刷新TAB2里面的内容。该如何做?

  • 写回答

1条回答

  • iteye_9319 2011-07-06 11:56
    关注

    选择tab可以在onSelect事件中处理:

    $('#tt').tabs({
    onSelect:function(title){
    var p = $(this).tabs('getTab', title);
    p.find('iframe').attr('src','...');
    }
    });

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器