显示效果如下图所示:
在这里我共分为二个页面 一个是 main.htm 是调用模式
另一个是 Dialog.htm 也就是要显示的模式窗体页面,为了便于学习,我尽量将代码少量化,方便初学者一看就懂
其体代码如下:
main.htm
<
head
>
< title > 主界面 </ title >
< script language ="javascript" type ="text/javascript" >
<!--
var str = "" ;
function Button1_onclick() {
window.showModalDialog( " Dialog.htm " ,window, " res
< title > 主界面 </ title >
< script language ="javascript" type ="text/javascript" >
<!--
var str = "" ;
function Button1_onclick() {
window.showModalDialog( " Dialog.htm " ,window, " res