在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
<%@ page language="c#" debug="true" %> <% if(Request.Form["submit"] == "submit"){ Session["name"] = Request.Form["name"]; Response.Redirect("frame.aspx"); } %> <html> <head> <title>登陆页面</title> </head> <body> <form action="index.aspx" method="post"> 姓名:<input type="text" name="name"> <br> <input type="submit" name="submit" value="submit" value="登陆"> </form> </body> </html> ----------------------------------- 框架页frame.aspx <html> <head> <title>框架页面</title> </head> <frameset rows="*,100"> <frame src="display.aspx"> <frame src="message.aspx"> </frameset> </html> ----------------------------------- 聊天记录显示页面display.aspx <%@ page language="c#" debug="true" %> <html> <head> <title>display</title> <meta http-equiv="refresh" content="5;url=display.aspx"> <script language="javascript"> function scrollWindow(){ this.scroll(0,6500); setTimeout("scrollWindow()",200); } scrollWindow(); </script> </head> <body> <% Response.Write(Application["chat_content"]); %> </body> </html> ----------------------------------- 发言页面:message.aspx <%@ page language="c#" debug="true" %> <% string message = Request.Form["message"]; string chat_content = Session["name"]+"说:"+message; Application.Lock(); Application["chat_content"] = Application["chat_content"] + "<br>" +chat_content; Application.UnLock(); %> <html> <head> <title>message</title> </head> <body bgcolor="lightblue" onload="document.all.message.focus();"> <form method="post" action="message.aspx" style="margin:0px;"> <input type="text" name="message" size="50"> <input type="submit"> </form> </body> </html> |
请发表评论