0

我的 iframe 被一个按钮关闭,这段代码:

parent.jQuery.colorbox.close()

喜欢

<button type="submit" onclick="parent.jQuery.colorbox.close()" ....

我能以某种方式计时这个活动吗?所以它会在 2 秒后关闭。前任?

我正在使用 ColorBox 库。

4

1 回答 1

0
<button type="submit" onclick="setTimeout(parent.jQuery.colorbox.close,2000)" ...

setTimeout 将延迟执行指定的毫秒数,在本例中为 2000。

于 2013-02-06T10:27:31.900 回答