使用XML.而无须不断刷新*.ASP.
无刷新实现发言的逐条显示.
使用Application变量存储聊天记录,所以要需要建立一个虚拟目录
服务器端不需要支持XML,只要支持ASP和能建立虚拟目录就可以了.
以下代码在nt4.0+iis4.0上通过.我估计在你的win2000下也差不多吧.
如果有问题,请多多赐教:netnice@chinaok.net
##########index.asp##############################
BODY{FONT-SIZE: 9pt}
TD{FONT-SIZE: 9pt}
.tbljm{BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid;color:#000000;}
function openWin()
{winst="Status=yes,scrollbars=yes,resizable=yes,width="+(screen.availWidth-10)+",height="+(screen.availHeight-50)+",top=0,left=0";
window.open('about:blank','7923sdfsdfs',winst);
}
function form_onsubmit(obj)
{ var no=0,psd="1234567890";
if(obj.UserName.value==""){alert("请输入你的昵称!\n"); obj.UserName.focus(); return false;}
if(obj.UserName.value.indexOf(" ")>-1 ||obj.UserName.value.indexOf("'")>-1 || obj.UserName.value.indexOf("\"")>-1){alert("你的昵称含有非法字符!\n"); obj.UserName.focus(); return false;}
openWin();
return true;
}
| ::::: ::::: |
|
用户登陆
|

