<input type="text" name="addr" value="http://www.sina.com"><input type="button" value="get" onclick="getHtml()">
<textarea name="res" rows="80" cols="80"></textarea>
<script>
function getHtml()
{
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.4.0");
xmlhttp.Open("Get",addr.value,false);
xmlhttp.send();
res.value = xmlhttp.responseText;
}
</script>
<textarea name="res" rows="80" cols="80"></textarea>
<script>
function getHtml()
{
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.4.0");
xmlhttp.Open("Get",addr.value,false);
xmlhttp.send();
res.value = xmlhttp.responseText;
}
</script>
<input type="text" name="addr" value="http://www.skycn.com">
<input type="button" value="get" onclick="getHtml()">
<br>
<textarea name="res" rows="30" cols="80"></textarea>
<script>
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.4.0");
function getHtml()
{
xmlhttp.Open("Get",addr.value,true);
waitLayer.style.display = "block";
xmlhttp.onreadystatechange=RSchange;
xmlhttp.send();
}
function RSchange()
{
if (xmlhttp.readyState==4) {
res.value = xmlhttp.responseText;
waitLayer.style.display = "none";
}
}</script>
<div id="waitLayer" align="center" style="position: absolute; top: 300; left: 200;width: 300; height: 40; background: #c8c8c8; display: none;">waiting.....</div>