急!!!!!!!VB中如何以Post方式提交表单??分数不够再加!!!!!!!!!!!!!!!
strFormData = "id=" + txtUser.Text + _
"&password=" + txtPassword.Text + _
"&prodsn=" + sznum + _
"&name=" + txtName.Text + _
"&phone=" + txtPhone.Text + _
"&ProductReg_Submit=送出资料&Submit22=重新输入"
INet.Execute "http://www.wgs.com.cn/win/wgs_win_ljk_pro.asp", "Post", strFormData, "Content-Type: application/x-www-form-urlencoded"
写个例子,在ie6 + msxml4.0下测试通过,支持中文!
Dim oXmlHttp as new Msxml2.XMLHttp
Dim sPostString as string,sRespText as string
sPostString = "id=1&name=小李" 需要提交的数据
oXmlHttp.open "POST","url",false url为处理提交数据的asp页面
oXMLHttp.setRequestHeader "content-type","application/x-www-form-urlencoded"
oXMLHttp.send sPostString
sRespText = oXmlHttp.responseText 得到处理后response回来的数据
Set oXmlHttp = Nothing
后台asp:
request.form("name") 得到的结果是 小李