VB6.0 WebBrowser 传数据
用VB6.0,WebBrowser控件传数据到网站。语句如下:WebBrowser1.Navigate("http://1111.5.12.20/test/insert....
用VB6.0 ,WebBrowser控件传数据到网站。 语句如下:
WebBrowser1.Navigate ("http://1111.5.12.20/test/insert.html?参数1=传入数据&参数2=传入数据&参数3=传入数据&参数4=传入数据") 想问下,传入数据直接写内容可以正常使用。 但如果想通过变量名或TEXT控件里的内容去传递则失败。 该如何处理?
按你的写法,提示我变量未定义 但找了几遍传输的数据都已定义。
Dim a, b, c, d, e, f, g, h, i, j As String
Dim x, y As Integer
a
= Text1.Text ; y = Text2.Text ; b = Text3.Text ; x = Text4.Text ;c =
Text5.Text
d = Text6.Text ;g = Text10.Text ; e = Text13.Text ;f =
Text14.Text
WebBrowser1.Navigate (""http://1111.5.12.20/test/insert.html?ww="
& e & "&qq=" & x & "&wz=" & a &
"&dz=" & d & "&phone=" & g & "&yh=" & f
& "&kh=" & c & "&name=" & b & "&no="
& y & "") 展开
WebBrowser1.Navigate ("http://1111.5.12.20/test/insert.html?参数1=传入数据&参数2=传入数据&参数3=传入数据&参数4=传入数据") 想问下,传入数据直接写内容可以正常使用。 但如果想通过变量名或TEXT控件里的内容去传递则失败。 该如何处理?
按你的写法,提示我变量未定义 但找了几遍传输的数据都已定义。
Dim a, b, c, d, e, f, g, h, i, j As String
Dim x, y As Integer
a
= Text1.Text ; y = Text2.Text ; b = Text3.Text ; x = Text4.Text ;c =
Text5.Text
d = Text6.Text ;g = Text10.Text ; e = Text13.Text ;f =
Text14.Text
WebBrowser1.Navigate (""http://1111.5.12.20/test/insert.html?ww="
& e & "&qq=" & x & "&wz=" & a &
"&dz=" & d & "&phone=" & g & "&yh=" & f
& "&kh=" & c & "&name=" & b & "&no="
& y & "") 展开
1个回答
展开全部
你连最基本的VB语法都弄错了!
Dim a As String, b As String, c As String, d As String, e As String, f As String, g As String, h As String, i As String, j As String, x As String, y As String
a = Text1.Text
y = Text2.Text
b = Text3.Text
x = Text4.Text
c = Text5.Text
d = Text6.Text
g = Text10.Text
e = Text13.Text
f = Text14.Text
WebBrowser1.Navigate "http://1111.5.12.20/test/insert.html?ww=" & e & "&qq=" & x & "&wz=" & a & "&dz=" & d & "&phone=" & g & "&yh=" & f & "&kh=" & c & "&name=" & b & "&no=" & y
或者不用变量也可以:
WebBrowser1.Navigate "http://1111.5.12.20/test/insert.html?ww=" & Text13.Text & "&qq=" & Text4.Text & "&wz=" & Text1.Text & "&dz=" & Text6.Text & "&phone=" & Text10.Text & "&yh=" & Text14.Text & "&kh=" & Text5.Text & "&name=" & Text3.Text & "&no=" & Text2.Text
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询