Reputation: 306
in Bridge.net i can only create a defult eventlistner. In javascript i will do it like this.
<div id="nose" onclick="Test(this);"></div>
<script>
function Test(htmlelement) {
var id = htmlelement.id;
console.log('area element id = ' + id);
}
</script>
Upvotes: 1
Views: 161
Reputation: 306
I fixed that this way.
public Static void SomeFunc(){
var label = new HTMLLabelElement();
label.TextContent = txtbox.Value;
label.Style.FontSize = "40px";
label.AddEventListener(EventType.Click,ClickEvent );
}
public static void ClickEvent (Event e)
{
var x = (HTMLElement)e.Target;
x.SetAttribute("value", "HelloWorld");
}
Upvotes: 1