所以我试图找到一个HTML元素,它是:
<a class="signout" href="https://www.dreamstime.com/logout.php">Sign out</a>
我的代码是:
Dim thepage As String = postreqreader.ReadToEnd
If thepage.Contains("<a href="https: //www.dreamstime.com/logout.php" class="signout">Sign out</a>") Then
good += 1
Label2.Text = "Good: " & good.ToString
If pencil = False Then
TextBox1.Text += currentaccount & vbNewLine
Me.Refresh()
End If
但是这个错误每次都会发生:OPEN ME
我试着删除空格,但它仍然出现错误,说逗号,")",或有效的表达式继续期望。
发布于 2018-07-01 01:22:01
您没有正确地转义引号。A“= A,"”=,“=
或者让我们使用*以便更容易看到,*"**,先是*表示开始,然后是“您的字符,然后是另一个*,这样它就知道字符结束了,而*则表示字符串的结束。
在更长的字符串中,如下所示:
"some string ""is"" here"
这将导致:
some string "is" here
https://stackoverflow.com/questions/51116896
复制相似问题