2 Replies Latest reply on Jan 12, 2019 3:37 AM by Jhon Carlo

    Set "onClick" like a variable

    Jhon Carlo Level 1

      I need to set "onClick" like a variable, something like this:



      var = MyVar;

      MyVar = x;


      function MyFunction + MyVar (){





      <button type="button"  onClick="MyFunction + MyVar()"> </button>


      Is there a way to set this?