温馨提示×

window.dialogArguments 使用说明

小云
114
2023-08-10 12:50:20
栏目: 智能运维
Windows服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

window.dialogArguments是一个只读属性,它返回打开当前窗口的窗口的参数。这个属性只在通过window.showModalDialog方法打开的模态对话框中才有值。

示例用法:

// 打开模态对话框
var dialogArgs = { name: "John", age: 30 };
var result = window.showModalDialog("dialog.html", dialogArgs);
// 在模态对话框中访问传递的参数
console.log(window.dialogArguments.name); // 输出 "John"
console.log(window.dialogArguments.age); // 输出 30

注意:window.showModalDialog方法目前已经被弃用,不推荐使用。

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:window.dialogArguments的使用

0