Xmlhttp, no refreshing sound, no funnel mark, the best effect, but high requirements on the browser, fortunately, my application is only a subsidiary function, so users do not need to enable this control ...... Finally, we decided to adopt this solution.
I wrote a test program with the following code for your reference:
==Test2.php ==============================
<?
Session_start ();
Echo "the current time is:". date ("Y-m-d H: I: s", time ());
?>
===Eg4.php ============================
<Script language = "javascript">
Function re ()
{
Var http = new ActiveXObject ("Microsoft. XMLHTTP ");
Http. open ("GET", "test2.php", false );
Http. send ();
Var str = bytes2BSTR (http. responsebody );
T. innerHTML = str;
SetTimeout ("re ()", 2000 );
}
</Script>
<Script language = vbscript>
Function bytes2BSTR (vIn)
Dim I
StrReturn = ""
For I = 1 To LenB (vIn)
ThisCharCode = AscB (MidB (vIn, I, 1 ))
If ThisCharCode <& H80 Then
StrReturn = strReturn & Chr (ThisCharCode)
Else
NextCharCode = AscB (MidB (vIn, I 1, 1 ))
StrReturn = strReturn & Chr (CLng (ThisCharCode) * & H100 CInt (NextCharCode ))
I = I 1
End If
Next
Bytes2BSTR = strReturn
End Function
</Script>
<Body onload = "re ();">
<Span id = t> loading data </span>
</Body>
In this way, when you run eg4.php, the page will display the current time, refresh every 2 seconds, no progress bar, no small funnel flag