久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      asp防止用戶刷新多次提交表單和使用后退鈕重復(fù)提交表單方法


      本文提供了一種只需使用幾行代碼的方法,輕松地實現(xiàn)了asp防止用戶刷新多次提交表單和使用后退鈕重復(fù)多次提交表單。

        文件一:表單文件formtest.asp
        <%
         Randomize ’初始代隨機數(shù)種子
         num1=rnd() ‘產(chǎn)生隨機數(shù)num1
         num1=int(26*num1)+65 ’修改num1的范圍以使其是A-Z范圍的Ascii碼,以防表單名出錯
         session(“antry”)=”test”&chr(num1) ’產(chǎn)生隨機字符串
         %>
         <form name=”test” action=”testact.asp” method=”post”>
         你的名字:<input type=’text’ name=” size=30>  ‘注意本行中使用了隨機表單項名
         <input type=’submit’ value=’提交’>
         </form>

        表單處理程序testact.asp

        <%
         teststr=request.form(session(“antry”))
         if teststr=”” then
          response.write “沒有填寫姓名或重復(fù)提交”
          ‘由于用戶沒有填寫名字,或表單被重復(fù)提交(標志為session(“antry”)為空)引起
         else
          response.write teststr
          session(“antry”)=””  ’提交成功,清空session(“antry”),以防重復(fù)提交??!
         end if
         %>

        在這里,你只需隨機化一個必填項目的表單項名即可,不必隨機化所有的表單項目

       

       

      分享到: 更多

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號