[Html]
Copy codeThe Code is as follows: <! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE> dialog box </TITLE>
<META http-equiv = Content-Type content = "text/html; charset = UTF-8">
<Style>
# Popupcontent {
Position: absolute;
Visibility: hidden;
Overflow: hidden;
Border: 1px solid # CCC;
Background-color: # F9F9F9;
Border: 1px solid #333;
Padding: 5px ;}
</Style>
<Script>
Var baseText = null;
Function showPopup (w, h ){
Var popUp = document. getElementById ("popupcontent ");
PopUp. style. top = "200px ";
PopUp. style. left = "200px ";
PopUp. style. width = w + "px ";
PopUp. style. height = h + "px ";
If (baseText = null) baseText = popUp. innerHTML;
PopUp. innerHTML = baseText + "<div id = \" statusbar \ "> <input type = \" button \ "value = \" Close window \ "onClick = \" hidePopup (); \ "> </div> ";
Var sbar = document. getElementById ("statusbar ");
Sbar. style. marginTop = (parseInt (h)-60) + "px ";
PopUp. style. visibility = "visible ";
}
Function hidePopup (){
Var popUp = document. getElementById ("popupcontent ");
PopUp. style. visibility = "hidden ";
}
</Script>
<META content = "MSHTML 6.00.2900.2838" name = GENERATOR> </HEAD>
<BODY>
<Div id = "popupcontent"> content </div>
<P> <a href = "#" onClick = "showPopup (300,200);"> onclick </a> </p>
</BODY>
</HTML>