how to detect a button click in javascript
snippet in javascript

how to detect a button click in javascript

user306

if(document.getElementById('button').clicked == true)
{
   alert("button was clicked");
}

how to detect a button click in javascript

user6926

<input id="button" type="submit" name="button" value="enter"/>