Question
Set "onClick" like a variable
I need to set "onClick" like a variable, something like this:
<script>
var = MyVar;
MyVar = x;
function MyFunction + MyVar (){
MyCode;
}
</script>
<button type="button" onClick="MyFunction + MyVar()"> </button>
Is there a way to set this?
Thanks;
