`
zhouxianglh
  • 浏览: 267418 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

打开MSN,QQ对话框

阅读更多

下面是一个用超链打开QQ临时对话框的代码

<html>
<head>
<style type="text/css">
<!--
.pAlert {
	font-family: "宋体";
	font-size: 14px;
	color: #FF00FF;
}
.pInfo {
	font-family: Arial;
	font-size: 14px;
	color: #0000FF;
}
-->
</style>
<title>花儿</title></head>
<script language="javascript" type="text/javascript">
var test=/^([0-9]){5,10}$/;
function funOnLoad(){
	var qbutton = document.getElementsByTagName("input")[1];
	qbutton.onclick = funQQ;
}

function funQQ(){
	var pTag = document.getElementById("pTag");
	var qqnumber = document.getElementById("qqnumber").value;
	if(test.test(qqnumber)){
		pTag.innerHTML='点击图片启动临时会话☆⌒_⌒☆';
		pTag.className='pInfo';
	}else{
		pTag.innerHTML='哥要的是QQ号,你给的是寂寞!~ (+﹏+)~';
		pTag.className='pAlert';
		return;
	}
	document.getElementById("ahref").href = "tencent://message/?Menu=yes&uin=" + qqnumber + "&Site=临时会话&Service=200&sigT=2a0e37386280486ada2b5d5e69ee49186ccae1257fd9e1c9598af1f0b9c916067002a57aaaec8c8d";
	document.getElementById("qqimage").src = "http://wpa.qq.com/pa?p=1:" + qqnumber + ":43";
}
</script>
<body onLoad="funOnLoad()">
<a target=_parent href="tencent://message/?Menu=yes&uin=591227&Site=临时会话&Service=200&sigT=2a0e37386280486ada2b5d5e69ee49186ccae1257fd9e1c9598af1f0b9c916067002a57aaaec8c8d" id ="ahref">
<img border="0" SRC='http://wpa.qq.com/pa?p=1:591227:43' alt="点击图片启动临时会话" id="qqimage">
</a> 
<input type="text" id = "qqnumber"/>
<input type="button" value="查看" />
<p id ="pTag">请输入QQ号码</p>
</body>
</html>
 

 

MSN代码生成:  http://settings.messenger.live.com/applications/CreateHtml.aspx
msn 只能在IE下使用
在线图片<img src="http://messenger.services.live.com/users/zhouxianglh@gmail.com/presenceimage?mkt=zh-cn"/>
聊天链接 <a href="msnim:chat?contact=zhouxianglh@gmail.com">与我交谈</a>
添加好友<a href="msnim:add?contact=sliang@live.cn">添加好友</a>

QQ代码生成: http://wp.qq.com
<a target=_parent href="tencent://message/?Menu=yes&uin=591227&Site=临时会话&Service=200&sigT=2a0e37386280486ada2b5d5e69ee49186ccae1257fd9e1c9598af1f0b9c916067002a57aaaec8c8d" id ="ahref">
QQ临时会话

</a>

QQ在线图片<img border="0" SRC='http://wpa.qq.com/pa?p=1:591227:43' alt="点击图片启动临时会话" id="qqimage">

 

更多请参考

http://han2000lei.iteye.com/blog/404732

分享到:
评论
Global site tag (gtag.js) - Google Analytics