使用a标签代替表单提交,怎么在提交前先验证用户名和密码为空????
答案:1 悬赏:70
解决时间 2021-01-30 10:00
- 提问者网友:疯子也有疯子的情调
- 2021-01-30 04:20
使用a标签代替表单提交,怎么在提交前先验证用户名和密码为空????
最佳答案
- 二级知识专家网友:煞尾
- 2021-01-30 04:49
function Juge(theform){
if(theform.username.value=="")
{alert("请输入用户名!");
theform.username.focus(); return (false);}
if(theform.password.value=="")
{alert("请输入密码!");
theform.password.focus(); return (false);}
return true;
}
登录
if(theform.username.value=="")
{alert("请输入用户名!");
theform.username.focus(); return (false);}
if(theform.password.value=="")
{alert("请输入密码!");
theform.password.focus(); return (false);}
return true;
}
登录
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯