asp如何编写一个最简单的聊天程序?
来源:asp之家 发布时间:2009-11-08 19:04:00
chat.html
<html>
<head>
<title>asp之家-简单聊天</title>
</head>
<frameset rows="*,100">
<frame src="chatopinions.asp">
<frame src="chatform.asp">
</frameset>
</html>
chatopinions.asp
<html>
<head>
<META HTTP-EQUIV=refresh content="5;URL=chatopinions.asp"></head>
<body bgcolor=FFFFFF>
<center>
<table border=0 width=350>
<tr><td width=50>
<% =Application("A9") %></td><td width=300><% =Application("B9") %>
</td></tr><tr><td>
<% =Application("A8") %></td><td><% =Application("B8") %>
</td></tr><tr><td>
<% =Application("A7") %></td><td><% =Application("B7") %>
</td></tr><tr><td>
<% =Application("A6") %></td><td><% =Application("B6") %>
</td></tr><tr><td>
<% =Application("A5") %></td><td><% =Application("B5") %>
</td></tr><tr><td width=50>
<% =Application("A4") %></td><td><% =Application("B4") %>
</td></tr><tr><td>
<% =Application("A3") %></td><td><% =Application("B3") %>
</td></tr><tr><td>
<% =Application("A2") %></td><td><% =Application("B2") %>
</td></tr><tr><td>
<% =Application("A1") %></td><td><% =Application("B1") %>
</td></tr></table>
<table border=0 width=350>
<tr><td align=right>
Get your chat at <A REF="http://www.aspxhome.com">Submitside</A>: free script.
</td></tr></table>
</center>
</body>
</html>
chatform.asp
<%
If Request.Form ("Opinion")="" then
ShowForm()
else
if Session("AA")="" then
NewUser()
GoAhead()
else
GoAhead()
end if
end if %>
<% Sub ShowForm() %>
<html><body bgcolor=FFFFFF>
<center>
<form method=post action=chatform.asp>
<table border=0><tr><td>
<% if Session("AA")="" then %>
选择名字或昵称
<input type=text name=Name size=20><BR>
输入您的看法
<% else %>
<% =Session("AA") %>
<% end if %>
<input type=text size=60 name=Opinion value="<% =request.form("Opinion") %>"><BR>
<input type=submit value="提交">
</td><tr></table>
</form>
</center>
</body>
</html>
<% End Sub %>
<% Sub GoAhead() %>
<%
BB=Request.form("Opinion")
BB=server.htmlencode(BB)
Application.Lock
Application("B1")=Application("B2")
Application("B2")=Application("B3")
Application("B3")=Application("B4")
Application("B4")=Application("B5")
Application("B5")=Application("B6")
Application("B6")=Application("B7")
Application("B7")=Application("B8")
Application("B8")=Application("B9")
Application("B9")=BB
Application("A1")=Application("A2")
Application("A2")=Application("A3")
Application("A3")=Application("A4")
Application("A4")=Application("A5")
Application("A5")=Application("A6")
Application("A6")=Application("A7")
Application("A7")=Application("A8")
Application("A8")=Application("A9")
Application("A9")=Session("AA")
Application.Unlock
%>
<html>
<head></head><body bgcolor=FFFFFF>
<center>
<form method=post action=chatform.asp>
<table border=0><tr><td>
<% =Session("AA") %> <input type=text size=60 name=Opinion>
<BR><input type=submit value="提交">
</td></tr></table>
</form>
</center>
</body>
</html>
<% End Sub %>
<% Sub NewUser() %>
<%
AA=Request.form("Name")
AA=server.htmlencode(AA)
Session("AA")=AA
%>
<% End Sub %>
猜你喜欢
- 特点:不需要另外加个清除DIV:after(伪对象)--设置在对象后发生的内容,通常和content配合使用,IE不支持此伪对象,非Ie 浏
- 本文研究的主要是python中协程的相关问题,具体介绍如下。Num01–>协程的定义协程,又称微线程,纤程。英文名Coroutine。
- golang常用库:gorilla/mux-http路由库使用golang常用库:配置文件解析库-viper使用golang常用库:操作数据
- 看了山人表单验证,又看了其他一些验证程序和相关的一些参考资料,写出了一个比较简洁的js表单验证程序。特点是扩展容易,可以方便的添加自己需要的
- 作为最流行的编程语言和最重要的 Web 开发语言之一,JavaScript 不断演变,每次迭代都会得到一些新的内部更新。让我们来看看 ES2
- 背景在小站点上,直接用git来部署php代码相当方便,你的远程站点以及本地版本库都有一个版本控制,追踪问题或者回滚是很轻松的事情。因为在小公
- 当我们的函数接收参数为任意个,或者不能确定参数个数时,我们,可以利用 * 来定义任意数目的参数,这个函数调用时,其所有不匹配的位置
- 本文实例为大家分享了python绘制彩虹图的具体代码,供大家参考,具体内容如下代码:from turtle import *#控制彩虹路径d
- Heroku是一个很棒的平台,它有很多的控件,并且搭建环境相对来说也比较容易。本指南中,我将一步一步指导你在Heroku平台上部署一个简单地
- 业务背景最近接到一个需求,在微信公众号界面设计一个独立界面,界面上有 A 电机进、A 电机退、B 电机进、B 电机退 4 个按钮,点击对应按
- 1、事件冒泡:在javascript事件传播过程中,当事件在一个元素上出发之后,事件会逐级传播给先辈元素,直到document为止,有的浏览
- 前言: 上一篇讲了Python排序问题中比较经典的三个方法,(链接:关于Python排
- 技巧之一:提高使用Request集合的效率 访问一个ASP集合来提取一个值是费时的、占用计算资源的过程。因为这个操作包含了一系列对相关集合的
- 在网页制作中,表单中的对象总是给人一种单调与沉闷的感觉,比如说按钮、文本框等,它们一成不变的模样与颜色
- 在某些情况下,如果明知道查询结果只有一个,SQL语句中使用LIMIT 1会提高查询效率。 例如下面的用户表(主键id,邮箱,密码): cre
- Session和Cookie在Web开发中,Session和Cookie是常见的两种技术,它们用于在客户端和服务器端之间传递数据。Sessi
- 我们经常会有对图像边缘做扩展的需求.比如希望卷积后得到的矩阵大小不变希望改变图像大小,但是不改变宽高比opencv实现opencv中使用co
- 使用pip安装python库的几种方式1、使用pip在线安装1.1 安装单个package格式如下:pip install SomePack
- 在使用AJAX获取数据时后台返回的大部分都是json数据,在进行程序开发时有时会需要直接对这些json数据在js程序中再进行一定的操作,如排
- 安装pyqt5wind@wind-ThinkPad-X250:~/Downloads/PyQt5_gpl-5.12.2$ python3 -