您当前的位置:图文娱乐站ASP专区 → 文章内容

ASP:用Asp编程实现QQ的在线情况查询

作者:佚名  来源:不详  发布时间:2007-4-15 23:19:07
]

<script language="JavaScript"> 
  <!-- 
  function getFaceImg(QQcode) 
  { 
  var Re=new RegExp("^[1-9]{1}\d+$","g"); 
  if (!QQcode  !Re.test(QQcode)) return; 
  var URL="http://search.tencent.com/cgi-bin/friend/oicq_find?oicq_no=" ?+QQcode?>http://search.tencent.com/cgi-bin/friend/oicq_find?oicq_no="+QQcode; 
  var http=new ActiveXObject("Microsoft.XMLHTTP"); 
  http.open("GET",URL,false,"",""); 
  http.setRequestHeader("CONTENT-TYPE","text/html; Charset=gb2312"); 
  http.send(); 
   
  if (http.status!=200) return; 
   
  var webStr=http.responseText; 
  Re=new RegExp(""(http://img.tencent.com/face/[^"]+)"","ig"); 
  if (Re.test(webStr)) 
  return "<a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=" ?+QQcode?>http://search.tencent.com/cgi-bin/friend/user_show_info?ln="+QQcode+"" target=_blank title="QQ:"+QQcode+""><img src=""+RegExp.$1+"" width=16 height=16 border=0></a>"; 

  http=null; 
  } 

  document.write("我的QQ状态:"+getFaceImg("44723461")); 
  //--> 
  </script>
 
  请作者联系本站,及时附注您的姓名。联系邮箱:edu#chinaz.com(把#改为@)。
Tags:Asp编程
责任编辑:阿婷
论坛】 【 】 【打印
文章评论 (评论内容只代表网友观点,与本站立场无关!)

用户名: 查看更多评论

分 值:100分 85分 70分 55分 40分 25分 10分 0分

内 容:

         (注“”为必填内容。)