Today, I carefully tested some compatibility issues with easyui and found that the following bug occurs when ie9 ie10 is loaded for the first time. :
After reading it carefully, I guess it is a duplicate reference of the script. I use the iframe framework mode. After logging on to the system, the desktop homepage also loads the same jquery script.
Later, I added a delay of 1 ms to the Code for loading the homepage, and the problem was solved. The Code is as follows:
SetTimeout (function (){
$ ("# Tabs"). tabs ('add ',{
Title: 'Personal desktops ',
Content: createFrameByTab ('/home/desktop. aspx '),
IconCls: 'home'
});
}, 1 );
Now, it may be due to the tab Memory leakage. How can this problem be solved?
Easyui source code:
Tab. panel ("options"). tab. remove ();
// Add
Var frame = $ ('iframe', tab );
If (frame. length> 0 ){
Framework0).contentcontactdoc ument. write ('');
Frame [0]. contentWindow. close ();
Frame. attr ('src', "about: blank ");
Frame. remove ();
}
//
Tab. panel ("destroy ");
Refer:
SCRIPT5009 error reported by jquery tabs and easyui tabs in IE9
Recently, the Jquery UI Tabs plug-in was used in a project. When a new tag is added, the iframe page is manually appended to tabs, and $ ("# tab") is used in iframe "). tabs ('delete', selectedindex); when the method removes tags, IE9 will report the SCRIPT5009 error. The error code points to jquery. line 3 of js reports that "isNaN" is undefined. isNaN is a JS native function. How can it be undefined? After some research, I finally found out that it was originally caused by iframe because IE had a bug in the collection of iframe elements, in general, you should change the src attribute value of this element to "abort: blank" and manually remove it from the DOM tree. Otherwise, memory leakage will occur. Open the source code of jquery tabs and find that the Tabs plug-in directly removes DIV panels when removing the tag, and does not process iframe. iframe is a sub-element of div panels, direct deletion will cause the above problems, so you can add the following code to modify the source code:
Var ifrm = panls. find ("iframe"); // first find iframe
If (ifrm. length> 0) {// when iframe exists
Var el = ifrm. get (0 );
El.contentdomaindoc ument. write (''); // clear the iframe content
El. contentWindow. close (); // prevent iframe Memory leakage
Ifrm. attr ('src', "about: blank ");
Ifrm. remove ();
}
Problem solving :)
Web technology sharing