<div id="div1" > </div> <div id="div2"> </div>
function func1(element) { ... } document.getElementById("div2").onclick = function foo() { doSomething(); }
HtmlElement el1 = WebBrowser.Document.GetElementById("div1"); HtmlElement el2 = WebBrowser.Document.GetElementById("div2"); String el1JavaFunc = el1.GetAttribute("onClick"); String el2JavaFunc = el2.GetAttribute("onClick");
mshtml.IHTMLDOMNode node = el1.DomElement as mshtml.IHTMLDOMNode; String el1JavaFunc = node.attributes("onclick").value.ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)