talk.asp

来自「Active Server Pages 网页制作教程看之前请传到ASP空间。或者」· ASP 代码 · 共 39 行

ASP
39
字号
<!-- #include virtual="/kjasp/func/DB.fun" -->
<%
Name = Request.Cookies("Name")
words = Request("words")

If Name = Empty Then ' 表示尚未登录
    Response.Redirect "Enter.asp"
End If

If Request("Send") <> Empty then
   If Len(Trim(words)) = 0 Then
       Msg = "您的留言一片空白!" 
   Else
      Set rs = GetMdbRecordset( "Chatroom.mdb", "Chatroom" )
      rs.AddNew
      rs("姓名") = Name
      rs("内容") = Request("words")
      rs.Update
      Msg = "您的谈话内容已加入聊天看板!"
   End If
End If
%>

<html>
<body background="../b01.jpg" bgcolor="#FFFFFF">
<form action="talk.asp" method="POST">
<table border="0">
<tr>
   <td valign="top" NoWrap>聊天内容:<p>
   <input type="submit" name="Send" value=" 送 出 ">
   </td>
   <td><textarea name="words" rows="4" 
   cols="60"><%=Request("words")%></textarea></td>
</tr>
</table>
</form>
<font Color=Red><%=Msg%></font>
</body>
</html>

⌨️ 快捷键说明

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