Avoid Page Reload on Form submission

Posted by Rajesh_Kumar under JavaScript category on | Points: 40 | Views : 564
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"/>
//My Javascrip function is as:
function alert_message()
alert("Hello Rajesh");
return false;

Comments or Responses

Login to post response