点击网页打开window.open(),其中包括框架集,但窗口.关闭不工作的框架集

on click webpage open window.open() and that include frameset but window.close not working in frameset

本文关键字:框架 窗口 工作 网页 open window 其中包括      更新时间:2023-09-26

我正面临一个大问题(至少对我来说)

点击网页,我打开窗口打开(),其中包括一个页面,该页面包含iframe但窗口。关闭在iframe中不工作。

这是我要打开的onclick窗口。open

 <a onclick="window.open('http://localhost:8080/xyz.jsp', 'tool','width=720,height=500,resizable=yes,scrollbars=yes');return false;" target="tool" href="#" class="nav5b">new style</a>

这是窗口中的url。在localhost:8080/xyz.jsp中打开

这是即将到来的帧

  <frameset>
        <iframe id=someid" width="700" src="http://localhost:8080/test.form" name="frame1" scrolling="yes">
    </frameset>

你试过了吗

parent.window.close();

" top "更好,如果你有超过2个层次的iframe "depth"。这里有一个很好的链接:窗口、窗口的区别是什么。Top和window。parent?