點(diǎn)擊登錄不會提示信息,請協(xié)助看下是什么問題
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標(biāo)題文檔</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<form id="demoForm">
? <fieldset>
? ? <legend>用戶登錄</legend>
? ? <p>
? ? ? <label for="username">用戶名</label>
? ? ? <input type="text" id="username" name="username" />
? ? </p>
? ? <p>
? ? ? <label for="password">密碼</label>
? ? ? <input type="password" id="password" name="password" />
? ? </p>
? ? <p>
? ? ? <input type="submit" value="登錄" />
? ? </p>
? </fieldset>
</form>
<script src="../jquery版本加載/jquery-1.10.0.js"></script>?
<script src="../js/jquery.validate-1.13.1.js"></script>
<script>
$(decument).ready(function(){
$("#demoForm").validate({
rules:{
username:{
required:true,
minlength:2,
maxlength:10
},
password:{
required:true,
minlength:2,
maxlength:16
}
},
messages:{
username:{
required:"必須填寫用戶名",
minlength:"用戶名最小為2位",
maxlength:"用戶名最大為10位"
},
password:{
required:"必須填寫密碼",
minlength:"密碼最小為2位",
maxlength:"密碼最大為16位"
}
}
});
});
</script>
</body>
</html>
2016-08-27
$(decument).ready(function(){}這里。。。你把document寫錯啦