我正在使用 jquery 表单验证来验证我的表单,但出现以下错误:
Uncaught ReferenceError: jQuery is not defined jquery.validate.js:1178
Uncaught TypeError: undefined is not a function bootstrap.js:29
Uncaught ReferenceError: $ is not defined mimi.html:20
这是我的代码:
<!DOCTYPE HTML>
<html>
<head>
<link type = "text/css" rel="stylesheet" href="css/bootstrap.css" />
<script type="text/javascript" src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script>
<script src="js/bootstrap.js"> </script>
<script>
$(function(){
$('form').validate()
});
</script>
</head>
<body>
<form class = "well span6">
<label> Username </label>
<input type="text" id = "myName" class ="span3" placeholder ="Type your username here..." class = "required"/>
<label> Password</label>
<input type="text" id "myPassword" class ="span3" placeholder ="Type your password here..." class = "required"/> <br/>
<button id = "submit" class ="btn btn-primary">Submit </button>
<button class = "" > Clear <br/></button><br/>
</form>
</body>
</html>
我会很感激你的帮助。