Avoid Page Reload on Form submission

Rajesh_Kumar
Posted by Rajesh_Kumar under JavaScript category on | Points: 40 | Views : 609
We can call Javascript function on ONSUMBIT event of Form to avoid page refreshing as

<form name="form1" onsubmit = "return alert_message()">
<input type="submit" name="Submit" value="Get Alert"/>
</form>
//My Javascrip function is as:
function alert_message()
{
alert("Hello Rajesh");
return false;
}

Comments or Responses

Login to post response