将数组传递给窗口 [英] Pass array to Window

查看:38
本文介绍了将数组传递给窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在javascript中将数组传递给window.openDialog或window.open吗?

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?

推荐答案

是的,我们可以......

yes we can ...

...window.openDialog 是 window.open 的扩展.它的行为是一样的,除了它可以选择接受一个或多个超过 windowFeatures 的参数,并且 windowFeatures 本身的处理方式略有不同.

...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.

可选参数(如果存在)将捆绑在 JavaScript Array 对象中,并作为名为 window.arguments 的属性添加到新创建的窗口中.它们可以随时在窗口的 JavaScript 中被引用,包括在加载处理程序的执行期间.然后,可以使用这些参数将参数传入和传出对话窗口.

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.

这篇关于将数组传递给窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆