We would like to know how to handle click event for submit button.
<!-- w ww . ja v a 2s .c o m-->
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.6.js'></script>
<script type='text/javascript'>
$(window).load(function(){
$('.submit').click(function() {
console.log('Button clicked');
});
});
</script>
</head>
<body>
<input type="submit" id="submit-reg" value="Register"
class="submit button">
</body>
</html>
The code above is rendered as follows: