The window plug-in of easyui is encapsulated again, And easyuiwindow is encapsulated.
The window plug-in of easyui is encapsulated again
Code:
/*** Easyui's window plug-in is encapsulated again in * November 10, 2014 */SimpoWin = {showWin: function showWindow (title, url, width, height) {if (! Top. simpoWinId) top. simpoWinId = 0; var divId = "simpoWin" + top. simpoWinId; top. $ ("body "). append ('<div id = "' + divId + '"> </div>'); top. $ ('#' + divId ). window ({modal: true, title: title, width: width, height: height, collapsible: false, minimizable: false, maximizable: false, content: function () {return '<iframe frameborder = "0" src = "' + url + '" >;}, onClose: function () {top. $ ('#' + divId ). win Dow ('deststroy'); top. SimpoWinId --; top. SimpoParentWin. pop () ;}). window ('open'); top. SimpoWinId ++; if (! Top. simpoParentWin) top. simpoParentWin = new Array (); top. simpoParentWin. push (window) ;}, closeWin: function () {var divId = "simpoWin" + (top. simpoWinId-1 ). toString (); top. $ ('#' + divId ). window ('close');}, GetWinParent: function () {return top. simpoParentWin [top. simpoParentWin. length-1] ;}}View Code