Web <script language= "JavaScript" >
function Getfemale ()
{
The first argument is the URL of the webservice, followed by the name
Female.useservice ("News.asmx?") WSDL ", News");
Set a callback function, the service returns the result of the callback; The first parameter is the name of the callback function, followed by the WebService parameter
Intcallid=female.news.callservice (Female_result, "Getphoto", "female"); Here are two parameters ...
}
function Female_result (Result)//callback functions
{
if (result.error)
{
female.innerhtml=result.errordetail.string;
}
Else
{
Female.innerhtml=result.value; Write the results returned by WebService as Div
}
}
</script>
Page Display section: <div id= "female" style= "Behavior:url (WEBSERVICE.HTC)" ></div>
OK, which provides a way for us to invoke dynamic content on the static page;
Here, if you add a timed call to the Getfemale () function, it's a mechanism to refresh the page without updating it.
The disadvantage is that webservice will have a certain delay, even if the local webservice will be slower than the static page, the initial opening of the page will feel very uncoordinated.