EasyUI Forum
April 28, 2024, 02:35:58 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: 1.4 tab iframe 刷新两次  (Read 12680 times)
wh19890605
Newbie
*
Posts: 11


View Profile Email
« on: August 03, 2014, 06:32:25 PM »

换了1.4版本后,tab里面放了iframe以后,会加载两次,请问如何解决呢?
Logged
gifeu
Newbie
*
Posts: 2


View Profile Email
« Reply #1 on: September 12, 2014, 12:59:29 AM »

我也一样,抄的网上的add tabs例子,用的是content方式(用href方式是好的,可是href方式在ie6下特别慢,单位都是老机器没法子),后来改了一下就好了,具体就是先不设src属性,等tab创建好了用jquery attr()函数来设
//var content = '<iframe scrolling="auto" frameborder="0"  src="' + url + '" style="width:100%;height:100%;"></iframe>'; //wrong 错误的写法
        var content = '<iframe scrolling="auto" frameborder="0" id="' + title + '" style="width:100%;height:100%;"></iframe>';//right 正确的写法
        $('#tabs').tabs('add', {
            title: title,
            content: content,
            closable: true
        });
        $("#" + title).attr("src",url); //add this line. 增加这栏
« Last Edit: September 12, 2014, 01:04:22 AM by gifeu » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!