JavaScript 显示弹出窗口

window . showModalDialog ( sURL,vArguments , sFeatures )
参数说明:
sURL--必选参数,用来指定对话框要显示的文档的URL。 //要显示页面的路径
vArguments--可选参数,用来向对话框传递参数。传递的参数类型不限,包括数组等。对话框通过window.dialogArguments来取得传递进来的参数。 //传入的参数
sFeatures--可选参数,用来描述对话框的外观等信息,可以使用一个或几个,用分号“;”隔开。//显示的对话框的外观
    center:{ yes | no | 1 | 0 | on | off }        居中显示
    dialogHide:{ yes | no | 1 | 0 | on | off }              隐藏对话框
    edge:{ sunken | raised }  //边缘
    help:{ yes | no | 1 | 0 | on | off }
    resizable:{ yes | no | 1 | 0 | on | off }  //可调大小
    scroll:{ yes | no | 1 | 0 | on | off }  //滚动条
    status:{ yes | no | 1 | 0 | on | off } //状态栏
    unadorned:{ yes | no | 1 | 0 | on | off }  //装饰


第二个参数传数据,在第二个页面通过window.dialogArguments;获取得到

如果参入的是window,可以通过这个调用第一个页面中的js代码

建立无模式对话框显示指定的文档:

vReturnValue = window . showModelessDialog ( sURL , vArguments , sFeatures )

原文地址:https://www.cnblogs.com/liuwt365/p/4195868.html