js判断登陆用户名及密码是否为空的简单实例
2021-06-23 03:06
标签:syntax name str ext 支持 .net cin highlight border js判断登陆用户名及密码是否为空的简单实例 PS一下 调用的话 如果是表单调用 即是 以上这篇js判断登陆用户名及密码是否为空的简单实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。 js判断登陆用户名及密码是否为空的简单实例 标签:syntax name str ext 支持 .net cin highlight border 原文地址:http://www.cnblogs.com/to-creat/p/7163109.html
>
// 验证输入不为空的脚本代码function checkForm(form) {
if(form.username.value == "") {
alert("用户名不能为空!");
form.username.focus();return false;
}if(form.password.value == "") {
alert("密码不能为空!");
form.password.focus();return false;
}return true;
}
文章标题:js判断登陆用户名及密码是否为空的简单实例
文章链接:http://soscw.com/index.php/essay/97663.html