在打开的新页里记住opener的URL,然后在想刷新opener时,对照一下它的目前URL,如果相同,就刷新,注意,你有可能要把刷新动作放在try/catch里,因为要是opener变成另外域的地址的话,opener.location.reload()也可能出错,var sOpenerURL ;
function window.onload()
{
sOpenerURL = window.opener.location.href;
}function refreshOpener()
{
try
{
if (window.opener.location.href == sOpenerURL)
opener.location.reload(true);
}
catch (e)
{}
}
function window.onload()
{
sOpenerURL = window.opener.location.href;
}function refreshOpener()
{
try
{
if (window.opener.location.href == sOpenerURL)
opener.location.reload(true);
}
catch (e)
{}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货