Already in IE8, firefox3.0.11 the following test passed
Copy Code code as follows:
$.extend ({
Includepath: ',
Include:function (file)
{
var files = typeof File = = "string"? [File]: file;
for (var i = 0; i < files.length; i++)
{
var name = Files[i].replace (/^\s|\s$/g, "");
var att = name.split ('. ');
var ext = att[att.length-1].tolowercase ();
var iscss = ext = "CSS";
var tag = iscss? "Link": "Script";
var attr = iscss? "Type= ' text/css ' rel= ' stylesheet '": "language= ' JavaScript ' type= ' Text/javascript '";
var link = (iscss? "href": "src") + "= '" + $.includepath + name + "'";
if ($ (tag + "[" + link + "]"). Length = = 0 document.write ("<" + tag + attr + link + "></" + tag + ">");
}
}
});
$.include ([' Script/jquery.divbox.js ', '/css/pop_win.css ']);
$ (document). Ready (function ()
{
var Isfirstalert = true;
var alertqueue = [];
Window.alert = Showalert;
var divalert = "";
Divalert + = "<div style=\" width:380px; height:180px; Overflow:hidden;display:none\ "id=\" divalert\ ">";
Divalert + + "<div class=\" win_c\ ">";
Divalert + + "<div class=\" win_t\ "id=\" \ ">";
Divalert + + "<div class=\" mail_timg\ ">Divalert + + "<div class=\" clear\ "><\/div>";
Divalert = "<\/div>";
Divalert + + "<div class=\" alrt2\ "style=\" Text-align:center\ ">";
Divalert + + "<span id=\" spaalertmessage\ "class=\" F14 ifont\ "><\/span><br \/>";
Divalert + + "<div class=\" clear\ "><\/div>";
Divalert = "<\/div>";
Divalert = "<p class=\" acenter\ "><input id= ' alertclose ' type=\" button\ "value=\" OK \ "class=\" Btn7\ "\/> & Lt;input type=\ "reset\" value=\ "Cancel \" style=\ "display:none\" class=\ "btn8\" \/><br \/><br, \/><\/p > ";
Divalert + = "<p> <\/p>";
Divalert = "<\/div>";
Divalert + = "";
Divalert = "<\/div>";
$ ("Body"). Append (Divalert);
function Showalert (info)
{
Alertqueue.push (info);
if (Isfirstalert)
{
Isfirstalert = false;
Openalert ();
}
}
$ ("#alertClose"). Click (Function ()
{
$ (' #divAlert '). Closediv ()
if (Alertqueue.length > 0)
{
SetTimeout (Openalert, 150);
}
});
function Openalert ()
{
$ ("#spaAlertMessage"). html (alertqueue[0]);
Alertqueue.splice (0, 1);
$ ("#divAlert"). Opendiv ();
}
});
Note: The above references JS and CSS jquery plug-ins