<script language="javascript">
function refreshiframe(){
document.iframe1.location.href=document.iframe1.location.href;
}
setInterval("refreshiframe()","60000")
</script>
<iframe src="t1.htm" width="100%" height="30%" name="iframe1">

解决方案 »

  1.   


    <script> 
    <!--  
    var limit="0:15" 
    if (document.images){ 
    var parselimit=limit.split(":") 
    parselimit=parselimit[0]*60+parselimit[1]*1 

    function beginrefresh(){ 
    if (!document.images) 
    return 
    if (parselimit==1) 
    document.iframe1.location.href=document.iframe1.location.href;
    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>  <body bgcolor="#FFFFFF" text="#000000"> 
    <iframe src="t1.htm" width="100%" height="30%" name="iframe1">
    </body> 
      

  2.   

    <script language="javascript">
    function refreshiframe(){
        document.getElementById("iframe1").location.href=document.getElementById("iframe1").location.href;
    }
    setInterval("refreshiframe()","60000")
    </script>
    <iframe src="t1.htm" width="100%" height="30%" name="iframe1" id="iframe1">
      

  3.   

    <iframe id="keepSession" src="http://www.baidu.com" ></iframe>
    <script>
    var iframe=document.all["keepSession"];
    setInterval(function(){iframe.src=iframe.src},60000);
    </script>这样做浏览器会有"反应",建议用ajax....
      

  4.   

    哪位老大用ajax给我实现一下?用ajax定时请求 re.html会延续用户session吗?