Is it possible to assign a value to a variable onclick? I know that I can assign a value to an input field, but I wanted something where I could do this:
var mysample = '';
<input type="button" id="sample0" onclick="mysample is assigned the value of 0" />
Possible?