怎么样能阻止这样的表单提交?
当前页为index.asp,我采用下面的方式来转到另一个页:
<form name= "form1 " name= "f2 " method= "post "action= "page_right.asp ">
当某个条件不满足时,请问怎么样能阻止它转到page_right.asp页?
[解决办法]
用本地脚本
if( 条件为假)
{
}
else
{
Response.Redircet( "目标网页 ")
}
[解决办法]
if( 条件为假)
{
return false;
}
else
{
form1.submit();
}
[解决办法]
<form name= "form1 " name= "f2 " method= "post "action= "page_right.asp " onsubmit= "return test(); ">
<script>
function test()
{
if(...)
return true;
else
return false;
}
</script>