how to call a function when a button is clicked inside javascript code example
Example: javascript onclick
document.getElementById("Save").onclick = function ()
{
alert("hello");
//validation code to see State field is mandatory.
}