对于楼主的问题,我想只能是用定时刷新的办法 ,参考下面的代码改一下,在frame里结合setTimeout+reload
<script>
var limit="0:10"
if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{ 
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+"分"+cursec+"秒后重刷本页!"
else
curtime=cursec+"秒后重刷本页!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}}
window.onload=beginrefresh
</script>

解决方案 »

  1.   

    把调用的js文件改为php文件
    然后在头上加上一句:
    <?header("Cache-Control: no-store, no-cache, must-revalidate");?>
      

  2.   

    <script src="/new/topnews.php"></script>
    这样调用的再入了
    <?header("Cache-Control: no-store, no-cache, must-revalidate");?>
    也一样,需要刷新二次才有显示
      

  3.   

    topnews.php<?
    header("Cache-Control: no-store, no-cache, must-revalidate");
    require_once '../../include/common.inc.php';
    $maxnews=14;
    $anews = $onews = array();
    $qnews=$db->query("select id,title,html,dateline from tx_news_posts where cityid='$cityid' or city='$ncity[city]' order by id desc limit 0,$maxnews");
    $tnews=$db->num_rows($qnews);
    while($pm = $db->fetch_array($qnews)) {
    $pm[dateline]=date("m-d",$pm[dateline]);
       $anews[] = $pm;
    }
    $j=0;
    foreach($anews as $pm) {
    $newstitle=substr($pm[title],0,26).chr(0);
    $newsurl=($pm[html]!="")?$pm[html]:"/article/detail.php?id=$pm[id]";
    $j++;
    echo "document.write(\"<a href=$newsurl target=_blank class='ntxt1'>$newstitle</a> <font color=#888888>$pm[dateline]</font><br>\");\n";
    }
    ?>
      

  4.   


    ////////////////////////////////////////////////////////////////////////////////////////
    $now = gmdate("D, d M Y H:i:s") . " GMT";
    header("Date: $now");
    header("Expires: $now");
    header("Last-Modified: $now");
    header("Pragma: no-cache");
    header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
    ////////////////////////////////////////////////////////////////////////////////////////都加上去!!!!!!!
      

  5.   

    ray929(海豚) 都加上去了。还一样。打开时没显示。要再刷新一下。
      

  6.   

    像这里的xml的一样
    后面加上随机数