现在这里是另一个问题.. 我的代码:验证不工作仍然在提交表格
<script type="text/javascript">
function validate_form()
{
if (document.myform.tele_caller.value == "")
{
alert ("Please insert the Name");
return false;
}
else
{
return true;
}
}
</script>
和形式 -
<form action="telecallerinfo.php?action=modify&id=<?php echo $id;?>" method="post" enctype="multipart/form-data" name="myform"
onsubmit="return validate_form ();">
<table class="panel1">
<tr>
<td align="center">Caller Name:
<input name="tele_caller" type="text" size="15" value="<?php echo $tele_caller?>" /></td>
</tr>
<tr>
<td align="right">
<input name="submit" id="submit" type="image" src="images/submit.gif" width="60" onclick="this.form.submit();"/>
<a href="telecallerinfo.php"><img src="images/cancel.gif" height="25" width="70"/></a>
</td>
</tr>
</table>
</form>
现在验证调用,并警告框也正在显示,但表单仍在提交中。错误在哪里?
Thanxx了很多。我一直在这里找到答案...... – champ 2010-09-27 10:29:07
@champ - 欢迎:) – 2010-09-27 10:29:36