用xmlhttp试试.
服务器端做个程序:
<%
set XmlDoc=Server.CreateObject("MSXML2.DOMDocument")
XmlDoc.load Request
IsGetTime = XmlDoc.DocumentElement.ChildNodes(0).GetAttribute("ok")
if IsGetTime="OK" then
ReturnInfo(now())//这里是服务器时间
end if
function ReturnInfo(sResult)
xmldoc.loadxml("<span>"&sResult&"</span>")
Response.ContentType = "text/xml"
xmldoc.save(Response)
Set xmldoc = Nothing
end function
%>
客户端:
sURL ="服务器地址";
sXML = "<root name='root'><element name='ok'/></root>"
var xmlhttpother = new ActiveXObject("Msxml2.XMLHTTP")
xmlhttpother.Open("POST", sURL, false)
xmlhttpother.Send(sXML)