Reputation: 2283
I have a series of iframes in my html page. Upon a button click, I would like to close the last iframe in the list. How do I do that?
Effectively, I want to do a window.close() on the last iframe and not a .remove().
Upvotes: 0
Views: 1319
Reputation: 2263
What do you mean "close" an iframe? Like Sascha said, it's not something that can be closed. Do you just want to do something like change the source to "about:blank" to make it appear empty?
I have now made an example of this (http://jsfiddle.net/fZDk3/) that uses $("#ifrm").attr("src", "about:blank");
Upvotes: 1