return false 不管用,表单还是提交了
ssh78 2009-10-27 06:27:31 <script language="javascript">
function checknum(scheck)
{
//window.alert(scheck);
//return false;
if (scheck=="False")
{
window.alert("月度合计金额小于预算金额");
return false;
}
}
</script>
<td><input name="cmdb" value="确定" type="submit" onclick="checknum('<%=scheck%>')" /></td>
<%
If Request("cmdb")="确定" then
response.write "<script>alert('成功');location.href='../aap/app_view.asp?appid="&appid&"';</script>"
end if
%>
问题是弹出窗口“月度合计金额小于预算金额”,但是也弹出“成功”了,页面也转向了。我的目的是return false就不让表单提交了呀