嗨,请检查下面的代码我正在尝试打开带有名称的标签,然后尝试关闭该标签但无法关闭,否则任何人都可以告诉我们如何关闭从父标签(url)打开的所有标签(url1,url2) firebug 中的关闭父选项卡错误是 my_window 未定义
<form name="submitForm1" target="my_window" method="POST" action="http://localhost:8080/ADDMIBREP/">
<input type="hidden" name="uname" value="uname">
<a HREF="javascript:document.submitForm1.submit();">ADDMIBREPORT</a>
</form>
<a HREF="javascript: closepopup() ">remove</a>
</body>
<script>
function closepopup()
{
alert("hi");
if(false == my_window.closed)
{
my_window.close ();
}
else
{
alert('Window already closed!');
}
} <script>