Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 592 Bytes

execute_javascript_from_button.md

File metadata and controls

19 lines (12 loc) · 592 Bytes

Execute JavaScript from button

Make a button call a JavaScript function.

<input id="clickMe" type="button" value="clickme" onclick="doFunction();" />

And with parameters

<input id="clickMe" type="button" value="clickme" onclick="doFunction('Hello', 42);" />

Do note the use of single-quotes, which do not interfere with the double-quotes used in the HTML markup.

Resources and References