function submitForm() {
var name = document.getElementById('name');
var password = document.getElementById('password');
if(/^\s*$/.test(name.value) || /^\s*$/.test(password.value)) {
alert('用户名或密码不能为空');
return false;
} else if(name.value=='admin' && password.value =='admin') {
alert('登录成功');
return true;
} else {
alert('登录失败');
return false;
}
}