我有此代碼需要在打開子窗口時關閉parent.html窗口,我需要在IE和Firefox中運行良好的代碼如何在Firefox中打開子窗口時自動關閉父窗口
Parent.html
<HTML>
<SCRIPT TYPE="text/javascript">
function sendTo()
{
window.open('child.html','_blank','resizable=yes,width='+(screen.width-500)+',height='+(screen.height-500)+'');
}
</SCRIPT>
<BODY>
<form name="form">
<input type="text" value="" name="text1" id="pdetails1">
<input type="text" value="" name="text1" id="pdetails2">
</br>
<input type="submit" value="submit" onClick="sendTo()">
</BODY>
</HTML>
child.html
<html>
<body>
<form>
<input type=text name="text5" value="">
<input type=submit name="submit"value="submit">
</form>
</body>
</html>
當你有一個適合你的答案時,你應該接受它作爲答案。 – 2011-03-24 04:09:48