我正在尝试从 webbrowser1 控件中删除 img 文件。
这就是我所做的。
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Dim origHTML As String
origHTML = WebBrowser1.DocumentText
Dim newHTML As String
Dim regex As String = "<img.*/>"
newHTML = regex.Replace(origHTML, regex, "", RegexOptions.Multiline)
WebBrowser1.DocumentText = newHTML
WebBrowser1.ScriptErrorsSuppressed = True
End Sub
我收到“重载解决失败,因为没有可访问的“替换”接受此数量的参数”错误。任何建议,请。