Announcement

Collapse
No announcement yet.

How can i get the html object that called a event in Bridge.net ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    How can i get the html object that called a event in Bridge.net ?

    in javacript 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>

    #2
    Never mind :) i got it now
     
     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");             }
    Last edited by wiliboi; 2018-09-25 @ 09:46 AM.

    Comment


      #3

      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"); }

      Comment


        #4
        Hi. Maybe the following Deck sample can help solve the problem, see

        https://deck.net/welcome

        Comment

        Working...
        X