CSS Style:
Copy Code code as follows:
Div.neat-dialog-cont {
z-index:98; Background:none Transparent scroll repeat 0% 0%; left:0px; width:100%; Position:absolute; top:0px; height:100%
}
DIV.NEAT-DIALOG-BG {
Z-INDEX:-1; Filter:alpha (opacity=70); left:0px; width:100%; Position:absolute; top:0px; height:100%; Background-color: #eee; opacity:0.7;
}
Div.neat-dialog {
Border-right: #555 1px solid; Border-top: #555 1px solid; z-index:99; margin-left:35%; Border-left: #555 1px solid; width:300px; Margin-right:auto;
Border-bottom: #555 1px solid; position:relative; top:25%; Background-color: #fff
}
Div.neat-dialog-title {
Padding-right:0.3em; Padding-left:0.3em; Font-size:1em; Padding-bottom:0.1em; margin:0px; Line-height:1.2em; Padding-top:0.1em; Border-bottom: #444
1px solid; Position:relative;background: #36C; color:white;
}
Div.neat-dialog P {
Padding-right:0.2em; Padding-left:0.2em; Padding-bottom:0.2em; Padding-top:0.2em; Text-align:center
}
Javascript Code:
Copy Code code as follows:
Open the window.
function F_opendialog () {
var SHTML = ' <p><input id= ' txtfile ' type= ' file '/></p> ' +
' <p><input id= ' btnyes "type=" button "onclick=" F_readexcel (); "value=" OK ">" +
' <button id= ' Btnno "onclick=" window.neatDialog.close (); > Cancel </button></p> ';
New Neatdialog (SHTML, "Please select Excel document!");
}
Close and remove the Bouncing window
NeatDialog.prototype.close = function () {
if (This.elt) {
This.elt.style.display = "None";
This.elt.parentNode.removeChild (This.elt);
}
Window.neatdialog = null;
}
Create a bounce window
function Neatdialog (SHTML, Stitle) {
Window.neatdialog = null;
This.elt = null;
if (document.createelement && document.getElementById) {
var dg = document.createelement ("div");
Dg.classname = "Neat-dialog";
if (stitle)
SHTML = ' <div class= ' neat-dialog-title ' > ' + stitle + ' </div>\n ' + SHTML;
dg.innerhtml = SHTML;
var dbg = document.createelement ("div");
Dbg.id = "ND-BDG";
Dbg.classname = "NEAT-DIALOG-BG";
var DGC = document.createelement ("div");
Dgc.classname = "Neat-dialog-cont";
Dgc.appendchild (DBG);
Dgc.appendchild (DG);
if (Document.body.offsetLeft > 0) {
Dgc.style.marginLeft = document.body.offsetLeft + "px";
}
Document.body.appendChild (DGC);
This.elt = DGC;
Window.neatdialog = this;
}
}
Effect: