9_4.asp

来自「ASP 网页数据库短训教程源码」· ASP 代码 · 共 36 行

ASP
36
字号
<html>
  <head></head>
  <body>
    <h3>Application实例</h3><hr>
<%
  name=Request.Form("visitor")
  i=Request.Form("chatno")
  if name<>"" then
    Application.Lock
    if i=0 then
      Application("chinese")=Application("chinese")+1
      chat="中文"
    elseif i=1 then
      Application("english")=Application("english")+1
      chat="英文"
    end if
    Response.write "欢迎<b>" & name & "</b>,你是来到"
    Response.write "<b>" & chat & "</b>讨论区的第"
    Response.write Application.Contents(i+1) & "位客人<p>"
    Response.write "<a href=9_2.asp>返回</a>"
    Application.Unlock
    Response.end
  end if
%>
    <form METHOD=POST>
    <table><tr><td>名字:<td><input type=text name="visitor" size=12>
    <tr><td>讨论区:<td><Select name=Chatno>
                    <option value=0>中文</option>
                    <option value=1>英文</option>
                    </select>
                    <input TYPE=SUBMIT value="确定">
    </table>
    </form>
  </body>
</html>

⌨️ 快捷键说明

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