当前位置: 代码迷 >> JavaScript >> 防止重复刷新无效?该怎么处理
  详细解决方案

防止重复刷新无效?该怎么处理

热度:174   发布时间:2012-04-19 14:36:43.0
防止重复刷新无效?
PHP code

//php
if(!empty($_GET['cloDept']) && !empty($_GET['cloUnit'])){
        $mysql->removeAlarm($_GET['cloUnit'],$_GET['cloDept']);
        echo "<script language='javascript'>alert('refresh-->><<');
        Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
        Response.Expires = 0;
        Response.Buffer = true;
        Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
        Response.AddHeader('pragma', 'no-cache');
        Response.CacheControl = 'no-cache';
        </script>";
        header('index.php');
    }

<Meta http-equiv="Refresh" Content="10">
<a style='font-size:12px' href='map.php?cloDept=<?=$marks['dept']?>&cloUnit=<?=$marks['unit']?>'>提交</a>



------解决方案--------------------
恭喜楼主了


  相关解决方案