Pass array to Window

老子叫甜甜 提交于 2019-12-11 21:52:56

问题


can we pass an array to window.openDialog or window.open in javascript?

I know that we can pass parameters, but can this be an array?


回答1:


yes we can ...

...window.openDialog is an extension to window.open. It behaves the same, except that it can optionally take one or more parameters past windowFeatures, and windowFeatures itself is treated a little differently.

The optional parameters, if present, will be bundled up in a JavaScript Array object and added to the newly created window as a property named window.arguments. They may be referenced in the JavaScript of the window at any time, including during the execution of a load handler. These parameters may be used, then, to pass arguments to and from the dialog window.



来源:https://stackoverflow.com/questions/2487420/pass-array-to-window

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!