一個免費的簡單聊天室源代碼_ASP教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!

      推薦:幾種打開記錄集方式的比較
      先定義conn.asp <% dim objConn dim strConn strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & chr(34) & Server

      chat.html

      以下為引用的內容:
      <html>
      <head><title>Chat</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.submitside.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 %>
      Chose a name or nickname
      <input type=text name=Name size=20><BR>
      Type your opinion
      <% else %>
      <% =Session("AA") %>
      <% end if %>
      <input type=text size=60 name=Opinion value="<% =request.form("Opinion") %>"><BR>
      <input type=submit value="Submit">
      </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="Submit">
      </td></tr></table>
      </form>
      </center>
      </body>
      </html>

      <% End Sub %>

      <% Sub NewUser() %>
      <%
      AA=Request.form("Name")
      AA=server.htmlencode(AA)
      Session("AA")=AA
      %>

      <% End Sub %>

      分享:ASP利用Google實現在線翻譯功能
      有時候想為我們的網頁提供多語言支持,如果一種語言用一張網頁來做實在太麻煩了,幸好Google提供了語言工具功能,下面介紹如何利用它來實現網頁多種語言之間的轉換。 lan.htm

      來源:模板無憂//所屬分類:ASP教程/更新時間:2008-08-22
      相關ASP教程