Show Posts
|
Pages: [1]
|
2
|
General Category / General Discussion / Re: 1.4 tab iframe 刷新两次
|
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. 增加这栏
|
|
|
|