Ajax表單提交例項

2021-04-12 16:29:21 字數 987 閱讀 2462

<%@ language="vbscript" codepage="65001"%>//codepage必須為650001,否則也出現亂碼,如果有html文字,一定設為utf-8編碼,否則將出現亂碼.

<%

dim regid, regpassword, str

regid=request.form("regid")

regpassword=request.form("regpassword")

f=request.form("file")

dim i, ii

ii = 0

for i = 0 to 1000000

ii = ii + i

next

if regid="" or regpassword="" then

str = "id和password必須填寫"

else

if regid <> "tony" then

str = "註冊成功,id為" & regid & " , 密碼為" & regpassword&f

else

str = "註冊失敗,id已經存在"

end if

end if

response.write "ge('msg').innerhtml='" & str & "';ge('regsubmit').disabled=false"

response.end

%>

如有其他疑問,請跟帖~

這個例項本人認為比較全面,是我用ajax表單提交的初學例項,相當夠用!如有錯誤,請指正!謝謝! 

Ajax提交表單

class form group type text class form control placeholder 使用者名稱 required id username div class form group type password class form control placeholder...

ajax非同步提交表單。

ajax非同步提交表單有幾種方法。1,不利用表單,通過拼接字串data 進行提交資料。此方法如果想 需要借助html5 filereader 把轉換成base64字串通過隱藏域傳值。這樣有把base64字串傳到後台,base64字串中的 會在提交的時候被轉義。可以吧base64字串進行加密再解密 2...

ajax實現表單提交

眾所周知現在的各大 基本都設有檔案上傳功能,使用者可以把自己喜歡的或其他檔案放在網上存起來,以便以後用的時候方便去找,可是乙個網頁的檔案上傳功能究竟該怎麼去設定呢?今天我就以上傳為例向大家展示檔案上傳功能的具體步驟。其實檔案上傳有兩種方法,一種是from表單submit提交,一種是ajax實現非同步...