原来我是用location.reload(),现在改为location.href = location.href 。
1.htm
代码
<form name="form1" action="1.htm" method="post">
<input type="submit" value="hello">
<input type="button" value=".." onclick="window.open('2.htm','','width=200,height=200')">
</form>
2.htm
代码
<form name="form1" action="2.htm" method="post">
<input type="button" value=".." onclick="javascript:hello()">
<script language="javascript">
function hello()
{
opener.location.href = opener.location.href;
}
</script>
</form>
评论