Tech Support > Microsoft Windows > Development Resources > IHTMLElement & OnClick string NOT "OnClick evnt"
IHTMLElement & OnClick string NOT "OnClick evnt"
Posted by Avex on October 1st, 2003


Hi all,

How can I get the string of OnClick of tag 'a' ? I mean I want to get the
string "NewWindow('http://www.yahoo.com" below.

I had try many method of IHTMLElement but invalid, such as get_outerText,
get_innerText, innerHtml ...etc . get_onclick is to get the handle of
handler, it doesn't fit my requirement. If it is, how to use? An easy
example is appreciated. Thanks.

ex: <html source>
<a onClick="NewWindow('http://www.yahoo.com" onMouseOut="KRes()"
onMouseOver="KSwap('Image1','','image2',1)"><img name="Image1" border="0"
src="/image/button1_a.gif" width="112" height="24"></a>

I want to preview it and do something myself not to trigger the onclick
event.