html on clikc elelment functions code example
Example 1: onclick a tag
<a href='http://www.google.com' onclick='return check()'>check</a>
<script type='text/javascript'>
function check() {
return false;
}
</script>
Example 2: javascript onclick
document.getElementById("Save").onclick = function ()
{
alert("hello");
//validation code to see State field is mandatory.
}