利用AJAX和ASP.NET实现简单聊天室

作者:凯旋网络来源:凯旋网络
on.search.length );//construct Ajax Server URLurl = ''Server.aspx?action=PostMsg&u='' + userid + ''&t='' +encodeURIComponent(chat) + ''&session='' + rnd;//Create and set the instance //of appropriate XMLHTTP Request objectreq = getAjax();//Update page with new messagereq.onreadystatechange = function(){if( req.readyState == 4 && req.status == 200 ) {updateAll();}}req.open( ''GET'', url, true );req.send( null );}
中国站.长.站

  完工!就是这些了。没什么特别的地方,下载示例程序,然后理解这些代码!

Chinaz_com

  • 广告推荐