1.php页面代码:<?
setcookie("js",$js+1);
?><html>
<script>
function opens(id)
{
window.showModalDialog("2.php?id="+id);
if(returnValue==2){
window.location.reload();
}
}
</script>
<body>
<a href="javascript:;" onclick="opens(1)"><font color="red">链接一</font></a>
<br><br>
页面计数器,看是否刷新:
<?echo$js;?>
</body>
<html>==================================
2.php页面代码:
<html>
<body>
<script>returnValue=2;window.close();</script> </body>
<html>============================================如果弹出窗口2.php中returnValue=2,那么1.php中
if(returnValue==2){
window.location.reload();
}
就刷新1.php主窗口问题是怎么传递和接收returnValue
?请高手帮忙,谢谢!
setcookie("js",$js+1);
?><html>
<script>
function opens(id)
{
window.showModalDialog("2.php?id="+id);
if(returnValue==2){
window.location.reload();
}
}
</script>
<body>
<a href="javascript:;" onclick="opens(1)"><font color="red">链接一</font></a>
<br><br>
页面计数器,看是否刷新:
<?echo$js;?>
</body>
<html>==================================
2.php页面代码:
<html>
<body>
<script>returnValue=2;window.close();</script> </body>
<html>============================================如果弹出窗口2.php中returnValue=2,那么1.php中
if(returnValue==2){
window.location.reload();
}
就刷新1.php主窗口问题是怎么传递和接收returnValue
?请高手帮忙,谢谢!
在2.php中:window.returnValue=ids;接收returnValue:
将1.php 中代码改成 var backValue = window.showModalDialog("2.php?id="+id);