先定义一个变量:online,然后用script嵌入这个url。。就可以给变量赋值。。 然后你判断0或1在换img的src http://webpresence.qq.com/getonline?Type=1&317619207: