Copier le code du code comme suit:
Window.Alert = fonction (str)
{{
var shield = document.CreateElement ("div");
shield.id = "shield";
shield.style.position = "absolu";
shield.style.left = "0px";
shield.style.top = "0px";
shield.style.width = "100%";
shield.style.height = document.body.scrollHeight + "px";
// la couleur d'arrière-plan lorsque la boîte de dialogue apparaît
shield.style.background = "#fff";
shield.style.textalign = "Centre";
shield.style.zindex = "25";
// arrière-plan transparent IE est valide
//shield.style.filter = "alpha (opacity = 0)";
var alertfram = document.CreateElement ("div");
alertfram.id = "alertfram";
alertfram.style.position = "absolu";
alertfram.style.left = "50%";
alertfram.style.top = "50%";
alertfram.style.marginleft = "-225px";
alertfram.style.margintop = "-75px";
alertfram.style.width = "450px";
alertfram.style.height = "150px";
alertfram.style.background = "# ff0000";
alertfram.style.textalign = "Centre";
alertfram.style.lineHeight = "150px";
alertfram.style.zindex = "300";
strhtml = "<ul style ="-list-style: Aucun; marge: 0px;
Strhtml + "<lice style =": # dd828d; 1px solide # f9cade; / "> [invite personnalisé] </li> / n";
STRHTML + = "LI STYLE =" / ">" + str + "</li> / n";
Strhtml + = "<li style =": # fdeef4; / "Button /" Value = / "OK /" onClick = / "DOOK () /" /> </li> / n ";
strhtml + = "</ul> / n";
alertfram.innerhtml = strhtml;
Document.Body.ApendChild (alertfram);
Document.Body.ApendChild (Shield);
var adj = setInterval ("doAlpha ()", 5);
this.dook = function () {
alertfram.style.display = "Aucun";
Shield.
}
alertfram.focus ();
document.body.onselectStart = function () {return false;};
}
L'effet est comme indiqué sur la figure