<%@ Page Language="C#" AutoEventWireup="true" CodeFile="在線聊天.aspx.cs" Inherits="在線聊天" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>無標題頁</title>
<!--添加meta標簽-->
<!--<meta http-equiv="refresh" content="2;URL=純css多級菜單.htm">-->
<!--表示每隔2秒重定向到純css多級菜單.htm頁面。-->
<!--<meta http-equiv="refresh" content="2">-->
<!--表示每隔2秒重刷頁面一次-->
</head>
<body>
<form id="form1" runat="server">
調用聊天接口方法1:
<input name="QQ" value="" />
<input onclick="show()" type="button" value="查看狀態" />
<input onclick="chat()" type="button" value="我要聊" />
<div id="QQShow"></div>
<div id="statue"></div>
調用聊天接口方法2:<br />
MSN:<a href="msnim:chat?contact=msn@hotmail.com">msn@hotmail.com</a> <br/>
Yahoo:<a href="ymsgr:sendIM?用戶ID">ya@yahoo.com.cn</a> <br/>
Skype:<a href="callto://sky88">sky88</a><br/>
QQ:<a href="http://wpa.qq.com/msgrd?V=1&Uin=QQ號碼&Site=站點名稱&Menu=yes"><img border="0" src=http://wpa.qq.com/pa?p=1:QQ號碼:1 alt="點擊這里給我發消息"/></a><br />
阿里旺旺:
<a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=dlucsf&site=cntaobao&s=1&charset=utf-8" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid=dlucsf&site=cntaobao&s=1&charset=utf-8" alt="點擊這里給我發消息" /></a>
<!--(補充一句,這個代碼只能在IE中正常調用旺旺程序,對於firefox則調用不了,而是轉到了要你下載旺旺的頁面)
代碼中參數的含義:
uid=dlucsf 改成你的旺號或者阿里旺旺的帳號名
site=cntaobao 這個不能改,改了就會顯示叉叉,無法識別帳號-->
</form>
</body>
</html>
<script language="JavaScript" type="text/javascript">
function show() {
document.all.QQShow.innerHTML = "<img src='http://qqshow-user.tencent.com/" + document.all.QQ.value + "/11/00'>";//QQ秀
document.all.statue.innerHTML = "<img src='http://wpa.qq.com/pa?p=1:" + document.all.QQ.value + ":4'>"; //QQ狀態 4表示不同的QQ狀態圖片 QQ狀態取值是1到9
}
function chat() {
window.open("http://wpa.qq.com/msgrd?V=1&Uin=" + document.all.QQ.value);//打開QQ聊天對話窗體
}
</script>