|
蓝森林 http://www.lslnet.com 2006年8月25日 8:28
MSN的InstantMessage为什么不能调用?
去年曾经做过的一个站点用到了在线MSN插件,当时是找的一段代码,但不知为什么今年再拿来用却不能用了。搜了N久,网上代码大部分类似,都是调用的InstantMessage来打开聊天窗口。但不知为什么我始终找不到原因,就是不行。每次运行都提示不支持此方法或属性。问一下朋友们有知道是什么原因的吗?MSN版本的原因?还是现在MSN根本不能实现在线插件?
注:我在调试时是双方同时在线的。
谢谢! |
[html]
<object id="MsgrUIA" classid="clsid:B69003B3-C55E-4b48-836C-BC5946FC3B28" codeType="application/x-oleobject" width="0" height="0"></object>
<script language="javascript">
function addMSN (address) {
if (MsgrUIA.MyStatus == 1)
{
MsgrUIA.InstantMessage(address)
//alert('您的MSN没有登陆,请先登陆');
}
else if(MsgrUIA.MyStatus == 2 || MsgrUIA.MyStatus == 10 || MsgrUIA.MyStatus == 14 || MsgrUIA.MyStatus == 34 || MsgrUIA.MyStatus == 50 || MsgrUIA.MyStatus == 66 || MsgrUIA.MyStatus == 6) { //2,10, 14, 34, 50,66,6
MsgrUIA.InstantMessage(address);
}
else if (MsgrUIA.MyStatus == 512 || MsgrUIA.MyStatus == 768)
{
alert('您的MSN正在登陆,请稍等');
}
else {
alert('错误代码:'+ MsgrUIA.MyStatus + '。您没有安装MSN或使用的不是IE浏览器,请安装MSN并手动添加' + address );
}
}
</script>
<a style="cursor:hand" onclick="javascript:addMSN('smallan424@hotmail.com')">Michael熊</a>
[/html]
|
谢谢楼上。你这段代码我曾经试验过,只要一点击就会提示我没有安装MSN或使用的不是IE,但我MSN即安装了也上线了,并且使用的绝对是IE,真搞不懂!
MSN版本:7。5
IE:6 |
我用的是7.0,试过没有问题 |
|