XMLHTTP+javascript+Asp写得聊天室,无刷新实现。原创代码放送!服务器支持Asp即可使用(二)

发表于:2007-06-30来源:作者:点击数: 标签:
################main.asp###################### %Response.Buffer=true Response.Expires=0 userName=Request.Form(username) if username= then Response.Redirect index.asp session(u_name)=username if Request.Form(sx)=1 then session(u_sx)=1 else s
################main.asp######################

<%Response.Buffer=true
Response.Expires=0
userName=Request.Form("username")
if username="" then Response.Redirect "index.asp"
session("u_name")=username
if Request.Form("sx")="1" then
session("u_sx")="1"
else
session("u_sx")="0"
end if
%>
<html>

<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link REL="SHORTCUTICON" url="images/Bluenote.ico">
<title>蓝蝶聊天室::欢迎您! Www.ChinaOk.net .............蓝蝶精品网.............Www.ChinaOk.net</title>
<style>
.fbd{BORDER-BOTTOM-COLOR: #3A5C9F; BORDER-BOTTOM-STYLE: solid; BORDER-LEFT-COLOR: #3A5C9F; BORDER-LEFT-STYLE: solid; BORDER-RIGHT-COLOR: #3A5C9F; BORDER-RIGHT-STYLE: solid; BORDER-TOP-COLOR: #3A5C9F; BORDER-TOP-STYLE: solid}
.topc{bgcolor:#ffff00}
</style>
<script Language="JavaScript">
self.onerror=null;
var nullframe = ‘’<HTML><BODY BGCOLOR=#003366 text=#ffffff><center><H3 color=#ffffff>正在读取资料, 请稍候 ......</h3></center></BODY></HTML>‘’;
</script>
</head>
  <frameset cols="*,0" rows="*" class=topc>
    <frameset rows="*,75" cols=‘’*‘’ framespacing="0" frameborder="1" border="0" >
      <frameset rows="45%,*" cols=‘’*‘’ framespacing="1"  border="1" name="content" frameborder=‘’YES‘’ class=topc>
        <frame name="pub" src="javascript:parent.nullframe" scrolling="auto"  frameborder=1 >
        <frame name="my" src="javascript:parent.nullframe" scrolling="auto"  frameborder=1>
      </frameset>      
    <frame name="sd" scrolling="no" noresize src="send.asp" >
    </frameset>
<noframes>
  <p>此网页使用了框架,但您的浏览器不支持框架。</p>

  </body>
  </noframes>
</frameset>


</html>

原文转自:http://www.ltesting.net