Answer: Use
OnSubmit Event of Form tag to avoid postback:
<form name="frm" onsubmit = "return js_function()">
<input type="submit" name="Submit" value="Get Alert"/>
</form>
Here,js_function() is my Javascript function,and write return false inside that Javascript function.
Asked In: Many Interviews |
Alert Moderator