<script>
var online= new Array()//全局变量,
</script>
<script src=" http://webpresence.qq.com/getonline?Type=1&qq号:"></script>//网络返回一个online数组正好覆盖上面定义的online 如:online[0]=1
<script>
if (online[0]==0)
document.write("不在线")
else
document.write("在线")
</script>
注意qq号后面要加“:”