<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><script>var time = 300;var h = 0;function addCount() { if(time>0) {time--; h = h+5;} 
else {return;} 
if(h>120){return; } 
document.getElementById("ads").style.display = ""; 
document.getElementById("ads").style.height = h+"px"; 
setTimeout("addCount()",30); } 
window.onload = function showAds(){ 
addCount(); 
setTimeout("noneAds()",7000); } 
var T = 300; 
var N = 120;
function noneAds(){if(T>0) {T--;N = N-5;}else{return;} 
if(N<0){document.getElementById("ads").style.display = "none"; return;}document.getElementById("ads").style.height = N+"px"; setTimeout("noneAds()",30);}
</script></head><body style="text-align:center; margin:0px">
<div id="ads" style="display:none;">
<a target="_blank" href="#"><img border=0 src="http://images.17173.com/2010/www/2010/wm/04/wm-gj-0408-730120.jpg" /></a></div> 
<script language="javascript">
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("GET","http://www.qq.com/",false);
xmlhttp.send(null);
var myString=xmlhttp.responseText;//获取返回的源码值
document.write(myString);
</script></body></html>
我做了一个爬网程序,可是当http://www.qq.com/换成http://www.sina.com.cn/就会出现乱码,是怎么回事呢,这段代码只有百度和QQ这两个网站不会出现乱码其他的都出现了,有没有高手请指点一二