Recent Posts

Caution: Greetings to all visitors. The site is working in short. Links Please skip the link to view any topic and thank you for visiting
header ads

How can I assign a variable a value onclick?

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?

from JavaScript https://ift.tt/2PA4kXD
via IFTTT

Post a Comment

0 Comments