XMLHTTP+Javascript+Asp写得聊天室,无刷新实现(六)

#############续send.asp#################

var oRDom=new ActiveXObject("Microsoft.XMLDOM");
oRDom.async=false;
var Path="reload.asp";
var tCok;
function Clock()
{cRld++;
if (cRld>10){cRld=1;GetXmlData();}
clearTimeout(tCok);
tCok=setTimeout("Clock()",1000);
}
function GetXmlData() //这就是刷新用户XML数据的函数
{cRld=1;
oRDom.load(Path)
if(oRDom.parseError.errorCode != 0)
{alert("Sorry.出现了错误");
return }
else
{
var aryF=oRDom.documentElement.selectNodes("F");
var aryT=oRDom.documentElement.selectNodes("T");
var arysC=oRDom.documentElement.selectNodes("sC");
var arycL=oRDom.documentElement.selectNodes("cL");
var arysJ=oRDom.documentElement.selectNodes("sJ");
var aryE=oRDom.documentElement.selectNodes("E");
var tmpHtml="";
lengt=aryF.length;
for(var i=0;i

 1<lengt;i++){ +arycl(i).text+"\'="" ;="" img="&lt;img src=girl.gif width=12 height=12 border=0&gt;" tmphtml="&lt;font style=\'cursor:hand;color:">"+eV[aryE(i).text*2]+rp2(arysC(i).text,"{^amp]","&amp;")+" <span class="t">["+arysJ(i).text+"]</span><br/>";   
 2tmpHtml=rp2(tmpHtml,"$F","<a href="\&quot;javascript:parent.sd.towho('&quot;+aryF(i).text+&quot;');\&quot;">"+img+aryF(i).text+"</a>");   
 3tmpHtml=rp2(tmpHtml,"$T","<a href="\&quot;javascript:parent.sd.towho('&quot;+aryT(i).text+&quot;');\&quot;">"+aryT(i).text+"</a>");   
 4if (aryF(i).text==Me || aryT(i).text==Me)   
 5{ parent.my.Ly.innerHTML+=tmpHtml;   
 6} else   
 7parent.pub.Ly.innerHTML+=tmpHtml;   
 8}   
 9}   
10delete(aryF);delete(aryT);delete(arysC);delete(arycL);delete(arysJ);   
11}   
12function towho(un){   
13document.say.T.options[0].value=un;   
14document.say.T.options[0].text=un;   
15document.say.says.focus();return;}   
16
17<base onmouseover="parent.window.status='欢迎光临 蓝蝶精品网 www.ChinaOk.net 站长:NetNice QICQ:6097356 ';return true;"/>
18
19<body bgcolor="#76b4d9" leftmargin="1" topmargin="4">
20<table border="0" cellpadding="0" cellspacing="0" width="767">
21<tr><td align="left" height="16" nowrap="" width="735">
22<form action="save.asp" method="post" name="say" onsubmit="return(checksays());" target="b">
23<input name="oldsays" type="hidden"/>
24<input ```"="" maxlength="10" name="F" readonly="" size="10" style="BACKGROUND-COLOR: #76aadd; BORDER-BOTTOM: 0px double; BORDER-LEFT: 0px double; BORDER-RIGHT: 0px double; BORDER-TOP: 0px double; COLOR: #ffffff; TEXT-ALIGN: right" u_name")="" value="```
25=session("/>   
26对 <select name="T" onclick="this.options[0].value='大家'; document.say.T.options[0].text='大家'; document.say.says.focus();">
27<option selected="" value="大家">大家</option>
28</select> 说:<input accesskey="t" language="javascript " maxlength="150" name="says" size="50" style="BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000" title="发表对话区(Alt+T)可激活!" type="text"/>
29<input accesskey="s" class="an" name="send" onmouseout="this.style.color='663300'" onmouseover="this.style.color='3366dd'" title="(Alt+S)" type="submit" value="发言"/>
30</form></td></tr></table>
31<div style="HEIGHT: 80px; LEFT: 15px; POSITION: absolute; TOP: 30px; WIDTH: 600px">
32<form name="oT">
33<table border="0" cellpadding="0" cellspacing="0" width="600">
34<tr>
35<td align="center" height="16" nowrap="" valign="top" width="160">
36<input accesskey="a" checked="" name="as" onclick="parent.pub.scrollit();parent.my.scrollit();document.say.says.focus();" type="checkbox"/><a onclick="moveself();" title=" “激活/禁止”对话区自动滚屏(Alt+A)!">滚屏</a>
37</td>
38<td align="left" height="16" nowrap="" valign="top" width="230"> <span title=" 改变你的发言的字体颜色(Alt+F)!">
39<select accesskey="f" name="usercolor" onchange="document.say.says.style.color=this.options[this.selectedIndex].value;">
40<option selected="" style="COLOR: #000000" value="000000">默认颜色</option>
41<option style="COLOR: #000000" value="#000000">黑色沉静</option>
42<option style="COLOR: #ff0000" value="#FF0000">红色热情</option>
43<option style="COLOR: #0000ff" value="#0000FF">蓝色开朗</option>
44<option style="COLOR: #ff00ff" value="#FF00FF">桃色浪漫</option>
45<option style="COLOR: #009900" value="#009900">绿色青春</option>
46<option style="COLOR: #009999" value="#009999">青色清爽</option>
47<option style="COLOR: #990099" value="#990099">紫色拘谨</option>
48<option style="COLOR: #990000" value="#990000">暗夜兴奋</option>
49<option style="COLOR: #000099" value="#000099">深蓝忧郁</option>
50<option style="COLOR: #999900" value="#999900">卡其制服</option>
51<option style="COLOR: #ff9900" value="#FF9900">镏金岁月</option>
52<option style="COLOR: #0099ff" value="#0099FF">湖波荡漾</option>
53<option style="COLOR: #9900ff" value="#9900FF">发亮蓝紫</option>
54<option style="COLOR: #ff0099" value="#FF0099">爱的暗示</option>
55<option style="COLOR: #006600" value="#006600">墨绿深沉</option>
56<option style="COLOR: #333333" value="#333333">灰色轨迹</option>
57<option style="COLOR: #999999" value="#999999">伦敦灰雾</option>
58</select></span>
59<span title=" 改变您的说话时的表情(Alt+Q)!"><select accesskey="q" name="userface" size="1" style="FONT-SIZE: 9pt;width:65px">
60<script language="Javascript">   
61for(var iF=0;iF<eV.length;iF+=2)   
62{document.writeln("<option value=\""+eV[iF]+"\">"+eV[iF+1]);   
63}   
64</script>
65</select></span> <input accesskey="m" id="ws" name="ws" type="checkbox"/><a title=" 和聊友说句悄悄话(Alt+M)!"><label for="ws">私聊</label></a> </td>
66<td align="left" height="16" nowrap="" valign="top" width="250">
67<input class="an" disabled="" id="clock" name="clock" style="color:#ff3300;width:60;" title="如果您长时间不发言(潜水),请注意:当计数器减至零时,您将被被踢出!" type="button" value="1200"/>
68</td>
69</tr>
70</table> </form>
71</div>
72<script>   
73write();   
74GetXmlData();   
75Clock();   
76</script>
77</body>
78</lengt;i++){>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus