⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 speak.asp

📁 web课件并附有习题练习还有实例详细的讲解了WEB的各种开发过程是学习 的好资料
💻 ASP
字号:
<html>
<%content=request.form("content")      '读取文本框控件的内容
if content="" then%>                  '若内容为空,则显示讨论区的输入页面
<form method="post" action="speak.asp">
请发言:<input type="text" name="content" size="30">
<a href="logout.asp"target="_parent">退出</a>
<input type="submit" value="发言">
</form>
<%else
name=session("name")						'读取用户名
content=request.form("content")				'读取发言内容
ip=request.servervariables("remote_addr")		'读取用户的IP地址
application.lock
'将用户名、IP地址以及发言内容写入application对象中
application("message")=name+":"+ip+":"+content+"<p>"+application("message")
application.unlock
show=application("message")
'确保显示最新的15条信息,其他的内容删除
i=1
for n=1 to 15
i=instr(i,show,"<p>")+3     
if i=3 then exit for
next
if not(i=3) then
application.lock
application("message")=left(show,i-2)
application.unlock
end if%>
<script language="Javascript">        '更新讨论区的输入页面和讨论区内容页面
top.d2.location.href="speak.asp"
top.d1.location.href="message.asp"
</script>
<%end if%>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -