ASP判断表单提交的文本字段是否为空

2025-04-15 19:56:54
推荐回答(3个)
回答1:

两种方法.一是用JS
function CheckForm()
{
if(document.form(表单名).f_title(元素名).value=="")
{
alert("不能为空!");
document.form(表单名).f_title(元素名).focus();
return false;
}
...
}

第2种用ASP
<%if request.form(f_title)<>"" or request.form(f_content)<>"" or request.form(f_other)<>"" then
接下来写你要执行的语句
%>

有问题加个群2976157

回答2:




f_title :


f_content:


f_other:



回答3:

js啊??