문제

In vb6 web browser control i am want to set style property for backgrpund color.I am doing it as shown below

If P.getAttribute("name") = "mybookmark" Then
    P.Style.cssText = "background-color:#FFFFEB"
End If

But if i do this then it overrides the style properties if any are there already. for example if a html tag with <A name="mybookmark" style="font-size:12px">abc</A> exists then my code will remove existing style add background color property. So how to add style property for existing one?

도움이 되었습니까?

해결책

Add to the existing style rather than replace it :)

P.Style.cssText = "background-color:#FFFFEB;" & P.Style.cssText

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top