It's very basic, but it's not working. I know I must be missing something really obvious.
Here is the fiddle.
<input type="button" onclick='clicked();' value='Click Me!'></input>
function clicked() {
alert('test');
}
It's very basic, but it's not working. I know I must be missing something really obvious.
Here is the fiddle.
<input type="button" onclick='clicked();' value='Click Me!'></input>
function clicked() {
alert('test');
}
You have your fiddle executing the JavaScript onload instead of in the head of the document.
try changing
function clicked() {
alert('test');
}
to
clicked = function() {
alert('test');
}