开发者

how to close all the opened windows(except the parent)onclick from a parent window in javascript?

I have a parent window which calls for a function that opens 2 new windows in javascript. When I click a close button, I want to close both the child windows. I tried window.close(windowname); windowName开发者_如何学编程.close(). Both didn't work.

Please help..


Assign the return values of your window.open(...) calls and call .close() on them later.

Demo: http://jsfiddle.net/ThiefMaster/NCzvH/1/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜