基于web的QQ实现代码(asp) ——在网叶(web)上实现简单QQ功能(转)
2006-10-12 22:33
986 查看
发送信息页面send.asp
发送信息页面send.asp
<html>
<head>
<title>发送信息页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%if request("text")="" then%>
<body bgcolor="#FFFFFF" text="#000000">
发送给:<select size="1" name="name">
<%for i=1 to 30
if application("towho"&i)=session("user") then
a=application("from"&i)%>
<option checked><%=a%></option>
<%else if application("user"&i)<>a then%>
<option><%=application("user"&i)%></option>
<%end if
end if
next%>
</select>
<br>
内容:<textarea rows="2" name="text" cols="20"></textarea>
</body><%else
for i=1 to 30
if application("towho"&i)="" then
application("towho"&I)=request("name")
application("from"&i)=session("user")
application("text"&i)=request("text")
end if
if application("towho"&i)=session("user") then
application("towho"&i)=""
application("text"&i)=""
application("from"&i)=""
end if
next
end if%>
</html>
接收信息页面inform.asp
接收信息页面inform.asp
<%for i=1 to 30
if application("towho"&i)=session("user")
response.wtite("来自:"&application("from"&i)&"<br>"&"内容"&application("text"&i))
end if%>//有关回信息只要加键接到send.asp(自己补充)
显示页面show.asp
显示页面show.asp
<html>
<head>
<title>基于web的QQ程序1</title>
<meta http-equiv="refresh" content="5">//每五秒取得一次信息(前面已经完成了有关登录之类的工作)
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
//假设同时通信量为30
<%
response.write("现在在线:"&"<br>"
for i=1 to 30
if application("user"&i)=session("user") then
response.write("<font color=#FFFF00>")
response.write(session("user")&"</font>")
else
response.write(application("user"&i)&"<br>")
end if
if application("towho"&i)=session("user") then%>
<script language="javascript">
window.open("inform.asp","","width=200,height=400")
</script>
<%end if
next%>
</body>
</html>
发送信息页面send.asp
<html>
<head>
<title>发送信息页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%if request("text")="" then%>
<body bgcolor="#FFFFFF" text="#000000">
发送给:<select size="1" name="name">
<%for i=1 to 30
if application("towho"&i)=session("user") then
a=application("from"&i)%>
<option checked><%=a%></option>
<%else if application("user"&i)<>a then%>
<option><%=application("user"&i)%></option>
<%end if
end if
next%>
</select>
<br>
内容:<textarea rows="2" name="text" cols="20"></textarea>
</body><%else
for i=1 to 30
if application("towho"&i)="" then
application("towho"&I)=request("name")
application("from"&i)=session("user")
application("text"&i)=request("text")
end if
if application("towho"&i)=session("user") then
application("towho"&i)=""
application("text"&i)=""
application("from"&i)=""
end if
next
end if%>
</html>
接收信息页面inform.asp
接收信息页面inform.asp
<%for i=1 to 30
if application("towho"&i)=session("user")
response.wtite("来自:"&application("from"&i)&"<br>"&"内容"&application("text"&i))
end if%>//有关回信息只要加键接到send.asp(自己补充)
显示页面show.asp
显示页面show.asp
<html>
<head>
<title>基于web的QQ程序1</title>
<meta http-equiv="refresh" content="5">//每五秒取得一次信息(前面已经完成了有关登录之类的工作)
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
//假设同时通信量为30
<%
response.write("现在在线:"&"<br>"
for i=1 to 30
if application("user"&i)=session("user") then
response.write("<font color=#FFFF00>")
response.write(session("user")&"</font>")
else
response.write(application("user"&i)&"<br>")
end if
if application("towho"&i)=session("user") then%>
<script language="javascript">
window.open("inform.asp","","width=200,height=400")
</script>
<%end if
next%>
</body>
</html>
相关文章推荐
- 【简单Web服务器搭建】基于Socket实现的最简单的Web服务器【ASP.NET原理分析】
- 【简单Web服务器搭建】基于Socket实现的最简单的Web服务器【ASP.NET原理分析】
- 【简单Web服务器搭建】基于Socket实现的最简单的Web服务器【ASP.NET原理分析】
- 简单的asp.net模拟邮箱系统基础实现(二 (2)具体版块功能的实现及关键代码之登陆页面)
- Android基于广播事件机制实现简单定时提醒功能代码
- 【简单Web服务器搭建】基于Socket实现的最简单的Web服务器【ASP.NET原理分析】
- 简单的asp.net模拟邮箱系统基础实现(二 (3)具体版块功能的实现及关键代码之母版页和写信界面)
- YbSoftwareFactory 代码生成插件【十】:ASP.NET WebApi MVC下审计、缓存和导出功能的实现
- 基于Server-Sent Event的简单聊天室 Web 2.0时代,即时通信已经成为必不可少的网站功能,那实现Web即时通信的机制有哪些呢?在这门项目课中我们将一一介绍。最后我们将会实现一个基于Server-Sent Event和Flask简单的在线聊天室。
- 一个简单的AJAX实现,基于C#的ASP.Net,包括服务器端的程序代码
- 基于ASP实现QQ在线查询功能
- 基于Server-Sent Event的简单聊天室 Web 2.0时代,即时通信已经成为必不可少的网站功能,那实现Web即时通信的机制有哪些呢?在这门项目课中我们将一一介绍。最后我们将会实现一个基于Server-Sent Event和Flask简单的在线聊天室。
- 简单的asp.net模拟邮箱系统基础实现(二 (1)具体版块功能的实现及关键代码之注册页面)
- QQ侧边栏功能简单实现,对初学者很适用,无序任何java代码即可实现
- 简单的asp.net模拟邮箱系统基础实现(二 (4)具体版块功能的实现及关键代码之收件和写信)
- 【转】【简单Web服务器搭建】基于Socket实现的最简单的Web服务器【ASP.NET原理分析】
- 一个简单的AJAX实现,基于C#的ASP.Net,包括服务器端的程序代码
- asp.net MVC实现简单的上传功能