javascript - How to prevent a form from submitting on page refresh?

by barkkathulla 2013-08-17 11:20:55


<form name="reg" action="" method="POST" onsubmit=" return validateForm();">
<table width="450" class="form_style">
<tr>
<td>Enter your name</td>
<td>
<input name="mail" id=mail type="text" class="txt" style="margin-left:-30px;" />
</td>
<td>
<input style="margin-left:150px;" type = "submit" class = "button" name = "check" onclick = "checkUser()"
value = "Show" />
</td>
</tr>


function validateForm()
{
return false;
}

1018
like
0
dislike
0
mail
flag

You must LOGIN to add comments