我正在读取文本框的内容,并使用“For Each循环”将字符串按顺序传递给包含php代码的url localhost:
$var = $_GET["nts"];
echo $var;
到目前为止一切都很好,问题是'循环'不等待文档'Web Browser'的完全加载,因此例如,我无法解析每个字符串的HTML文档,这个想法是在“Web浏览器”中启动一个字符串并等待完整加载文档“Web浏览器”以启动第二个字符串,依此类推。
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim tb As String = TextBox1.Text
If String.IsNullOrEmpty(tb) Then
MsgBox("Null")
Else
For Each t As String In tb
If (String.IsNullOrWhiteSpace(t)) Then
Else
WebBrowser1.Navigate(String.Concat("http://localhost/a/as.php?nts=", t))
End If
Next
End If
End Sub
Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
End Sub