内嵌一个隐藏的iframe,iframe和父页面通讯,
iframe负责根据条件去查询数据库,所得值返回
到父页面,用Javascript实现iframe页面的重定向,
同时iframe页面重载完毕,将所得结果返回给
父页面,实现不更新当前页面,数据及时更新。

解决方案 »

  1.   

    如楼上的所说,
    你可以用脚本,
    在指定的间隔时间内,reload
    iframe即可
      

  2.   

    不好意思,因为我对JavaScript还不是很熟悉。
    我想问一下,该如何写?
    这是Product的内容:
    <html>
    <title>Product</title>
    <SCRIPT language=Javascript>
    <!--
    setInterval("refresh()", 5000);
    function refresh()

      document.productshow.reload("true");
      
    }
    -->
    <body>
     
    //我这样写对么?? <iframe name="productshow" src="product1.html" marginwidth="0"  marginheight="0" scrolling="yes" frameborder="1" width="100%" height="50%"> 
     </iframe>   //product1.html中是productname和price的信息
     
     </body>
    </html>下面是productshow的内容:
    <html>
    <body>
     <frame name="productshow">
      <tr><td>productname</td><td>price</td></tr>
     </frame>    //只要更新这些信息
     </body>
    </html>
    谢谢!!
      

  3.   

    http://www.ayinfo.net/kok/codelist.html
    把这个修改一下就可以了。下载完页面后,刷新时只刷数据,网页保留。
      

  4.   

    用xmlHTTP,给一个例子,用于实时得到服务器端的时间
    <html>
    <head>
    </head><body onload="getPage()">
    <h2>Using the HttpRequest Object</h2><p>
    <b>status:</b>
    <span ID="A1"></span>
    </p><p>
    <b>status text:</b>
    <span ID="A2"></span>
    </p><p>
    <b>response:</b>
    <br><span ID="A3"></span>
    </p></body>
    </html><script type="text/javascript">
    function getPage()
    {
    var objHTTP = new ActiveXObject("Microsoft.XMLHTTP")
    objHTTP.Open('GET','http://netfish.host.sk/test1.php',false)
    objHTTP.Send()
    document.all['A1'].innerText= objHTTP.status
    document.all['A2'].innerText= objHTTP.statusText
    document.all['A3'].innerText= objHTTP.responseText
    }
    setInterval('getPage()', 100);
    </script>