01.
<html>
02.
<head>
03.
<title>Open a dialog window</title>
04.
<script type=
"text/javascript"
>
05.
function openDialog(form) {
06.
var result = window.showModalDialog(
"http://www.java2s.com"
, form,
"dialogWidth:300px; dialogHeight:201px; center:yes"
);
07.
}
08.
</script>
09.
</head>
10.
<body>
11.
<h1>Internet Explorer Modal Dialog Window</h1>
12.
<hr />
13.
<form name=
"sample"
action=
"#"
onsubmit=
"return false"
>
14.
Enter your name for the dialog box:
15.
<input name=
"yourName"
type=
"text"
/>
16.
<input type=
"button"
value=
"Send to Dialog"
onclick=
"openDialog(this.form)"
/>
17.
</form>
18.
</body>
19.
</html>