當前位置:編程學習大全網 - 網站源碼 - ASP 用response.redirect重復提交表單 怎麽只執行壹次 ,有什麽辦法多次提交表單嗎

ASP 用response.redirect重復提交表單 怎麽只執行壹次 ,有什麽辦法多次提交表單嗎

ASP中response.redirect是跳轉到另外壹個網址,會將瀏覽器重定向到另壹個 URL。

1、response.redirect壹般不適合表單提交。如果需要循環提交多個內容到數據庫,可以把提交頁面功能代碼直接寫到頁面中。

比如:

do while not rs.eof

'這裏直接寫提交頁面的功能,比如寫入數據庫的內容等

rs.movenext

loop

2、如果非要跳轉獨立頁面來完成數據的提交。可以使用iframe的方式。

比如:

do while not rs.eof

response.write "<iframe src='這裏寫原來response.redirect跳轉的網址和參數' width='100%' height='50' scrolling='No' allowtransparency="true" border='0'></iframe>"

rs.movenext

loop

綜合考慮還是盡量采用第壹種提交方式。

  • 上一篇:中國的三八線和鴨綠江的距離是多少?
  • 下一篇:uibot識別速度
  • copyright 2024編程學習大全網