asp.net在前台web页面中使用Javascript调用RTX腾讯通的聊天窗口
asp.net在前臺(tái)web頁(yè)面中使用Javascript調(diào)用RTX騰訊通的發(fā)送消息窗口,達(dá)到與你應(yīng)用系統(tǒng)的集成。可以放在你的OA系統(tǒng)中,直接使用javascript彈出RTX的聊天窗口
前提條件:安裝了RTX的機(jī)器,不需要服務(wù)端配置,不需要安裝開發(fā)SDK,直接使用js進(jìn)行調(diào)用,保證你的RTX已經(jīng)登錄,正常運(yùn)行
測(cè)試環(huán)境:RTX2009版本
//后臺(tái)cs沒任何代碼
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1.Default" %>
<!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>
? ? <script language="javascript" type="text/javascript">
// <![CDATA[
? ? ? ? function Button1_onclick() {
? ? ? ? ? ? var RTXAX = document.getElementById("RTXAX");
? ? ? ? ? ? var objIM = RTXAX.GetObject("RTXPlugin.IM");
? ? ? ? ? ? objIM.Call(1, "1001");
? ? ? ? }
? ? ? ? function Button2_onclick() {
? ? ? ? ? ? window.open("http://dacong.taobao.com");?
? ? ? ? ??
? ? ? ? ? ? var RTXAX = document.getElementById("RTXAX");
? ? ? ? ? ? var objIM = RTXAX.GetObject("RTXPlugin.IM");
? ? ? ? ? ? var array1 = new Array(3);
? ? ? ? ? ? array1[0] = "1001";
? ? ? ? ? ? array1[1] = "1002";
? ? ? ? ? ? array1[2] = "1003";
? ? ? ? ? ? var objProp = RTXAX.GetObject("Property");
? ? ? ? ? ? objProp.Value("RTXUser") = array1;
? ? ? ? ? ? objProp.Value("Text") = "this is a test!"; // '要發(fā)送的消息內(nèi)容
? ? ? ? ? ? objIM.Call(1, objProp);
? ? ? ? ? ? //window.open("http://dacong.taobao.com"); //不能成功的去這里看看
? ? ? ? }
// ]]>
? ? </script>
</head>
<body>
? ? <form id="form1" runat="server">
? ? <object id="RTXAX" data="data:application/x-oleobject;base64,fajuXg4WLUqEJ7bDM/7aTQADAAAaAAAAGgAAAA=="
? ? ? ? classid="clsid:5EEEA87D-160E-4A2D-8427-B6C333FEDA4D">
? ? </object>
? ? <div>
? ? ? ? <input id="Button1" type="button" value="無(wú)消息內(nèi)容" οnclick="return Button1_onclick()" />
? ? ? ? <input id="Button2" type="button" value="有消息內(nèi)容的" οnclick="return Button2_onclick()" />
? ? </div>
? ? </form>
</body>
</html>
asp.net在前臺(tái)web頁(yè)面中使用Javascript調(diào)用RTX騰訊通的聊天窗口,代碼沒環(huán)境測(cè)試,單位的機(jī)器是測(cè)試成功的。
總結(jié)
以上是生活随笔為你收集整理的asp.net在前台web页面中使用Javascript调用RTX腾讯通的聊天窗口的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CommandName 限制
- 下一篇: IIS 6 元数据库与IIS 6 配置的