gpt4 book ai didi

javascript - jQuery 验证 : Uncaught type error:$(. ..) formValidation 不是函数

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:44:34 26 4
gpt4 key购买 nike

我收到错误 Uncaught TypeError:$(..) form Validation is not a function 该错误来自下面 JS 代码中的一行。我该如何解决?我应该改变什么???请分享您的知识...

 <script type="text/javascript">
$(document).ready(function() {
$('#loginform').formValidation({
framework: 'bootstrap',
excluded: ':disabled',
icon: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
user_name: {
validators: {
notEmpty: {
message: 'The username is required'
}
}
},
password: {
validators: {
notEmpty: {
message: 'The password is required'
}
}
}
}
});
});
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Welcome to Aravind Eyecare RFID</title>
<meta name="description" content="description">
<meta name="author" content="Evgeniya">
<meta name="keyword" content="keywords">
<meta name="viewport" content="width=device-width, initial-scale=1">

<script src="plugins/bootstrapvalidator/bootstrapValidator.min.js"></script>

<script src="plugins/bootstrapvalidator/bootstrapValidator.js"></script>

<script src="plugins/jquery/jquery.validate.min.js"></script>

<script src="plugins/jquery/jquery-2.1.0.min.js"></script>

<script src="plugins/jquery-ui/jquery-ui.min.js"></script>

<!-- Include all compiled plugins (below), or include individual files as needed -->

<script src="plugins/bootstrap/bootstrap.min.js"></script>

<script src="plugins/justified-gallery/jquery.justifiedgallery.min.js"></script>

<script src="plugins/tinymce/tinymce.min.js"></script>

<script src="plugins/tinymce/jquery.tinymce.min.js"></script>
<!-- All functions for this theme + document.ready processing -->

<script src="js/devoops.js"></script>
<link href="plugins/bootstrap/bootstrap.css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Righteous' rel='stylesheet' type='text/css'>
<link href="css/style.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="http://getbootstrap.com/docs-assets/js/html5shiv.js"></script>
<script src="http://getbootstrap.com/docs-assets/js/respond.min.js"></script>

<![endif]-->




<!-- begin snippet: js hide: false -->

<body>
<form name="loginform" action="logincheck.jsp" method="post">
<div class="container-fluid">
<div id="page-login" class="row">
<div class="col-xs-12 col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3">
<div class="box">
<div class="box-content">
<div class="text-center">
<h3 class="page-header">Login</h3>
</div>
<div class="form-group">

<label class="col-xs-3 control-label">Username</label>
<div class="col-xs-4">

<input type="text" class="form-control" name="user_name" placeholder="Username" />
</div>

<div class="col-xs-4">

&nbsp;
</div>
<div class="col-xs-4">

&nbsp;
</div>

</div>
<div class="form-group">
<label class="col-xs-3 control-label">Password</label>
<div class="col-xs-4">
<input type="password" class="form-control" name="password" placeholder="Password" />
</div>

</div>
<div class="text-center">

<div class="col-xs-4">

&nbsp;
</div>
<div class="col-xs-4">

&nbsp;
</div>

<input type="submit" class="btn btn-primary" value="Sign in">

</div>

</div>
</div>
</div>
</div>
</div>
</form>





</body>

</html>

最佳答案

formValidation() 不是 jQuery 原生函数。也许您忘记包含另一个库,或者您忘记将函数粘贴/写入您自己的 js 库。

关于javascript - jQuery 验证 : Uncaught type error:$(. ..) formValidation 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32065797/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com