Hi. I have 1 webbrowser and 2 buttons on my form. After the site gets loaded, I press on a section of the site itself, click the first button to change the style of the html element (works well) and then I click on the second style button, what happens is that the first styling is removed and the second one is applied.
How to keep the old style changes and add new ones?
Also, could it be possible to change 2 different styles of a html element with one code line, something like:
WebBrowser1.Document.ActiveElement.Style = "color:blue" & "border:dotted"
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://www.yahoo.com/")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Document.ActiveElement.Style = "color:blue"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
WebBrowser1.Document.ActiveElement.Style = "border:dotted"
End Sub
Also, could it be possible to change 2 different styles of a html element with one code line, something like:
WebBrowser1.Document.ActiveElement.Style = "color:blue" & "border:dotted"