你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
发现
话题
注册
登录
bootstrapvalidator remote
bootstrapvalidator remote
没有找到相关结果
已邀请:
与内容相关的链接
提交
4 个回复
A_small_cake
赞同来自:
根据官方给出的api
当表单属性验证通过后可通过remote属性来执行ajax请求到后台验证! 不知道为啥官方下载的DEMO都不行!
知道的大虾帮忙解答下,谢谢!
下面例子就是官方demo中的
<!DOCTYPE html>
<html>
<head>
<title>BootstrapValidator demo</title>
<link rel="stylesheet" href="../vendor/bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" href="../dist/css/bootstrapValidator.css"/>
<script type="text/javascript" src="../vendor/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../vendor/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../dist/js/bootstrapValidator.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<!-- form: -->
<section>
<div class="page-header">
<h1>Sign up</h1>
</div>
<div class="col-lg-8 col-lg-offset-2">
<form id="defaultForm" method="post" class="form-horizontal" action="target.php">
<div class="form-group">
<label class="col-lg-3 control-label">Username</label>
<div class="col-lg-5">
<input type="text" class="form-control" name="username" autocomplete="off" />
</div>
</div>
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
</div>
</section>
<!-- :form -->
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#defaultForm').bootstrapValidator({
message: 'This value is not valid',
// live: 'disabled',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
username: {
message: 'The username is not valid',
validators: {
notEmpty: {
message: 'The username is required and can\'t be empty'
},
remote: {
type: 'POST',
url: 'remote.php',
message: 'The username is not available',
delay: 1000
}
}
}
}
});
});
</script>
</body>
</html>
A_small_cake
赞同来自:
问题已经解决!
A_small_cake
赞同来自:
每日送彩
重庆时时彩开奖预测平台,为广大时时彩彩民,提供免费的开奖预测数据,帮助彩民们实现自主购彩提高中彩几率.
童言无忌
赞同来自:
请问怎么解决的
要回复问题请先
登录
或
注册
发起人
A_small_cake
相关问题
bootstrap,模态窗口如何remote一个新的页面到现在的窗口?
bootstrapValidator验证input的name属性有点怎么解决
bootstrapValidator
Bootstrap bootstrapvalidator 验证问题
如何拿到bootstrapValidator的验证结果呢
bootstrapvalidator remote $.ajax请求
bootstrapValidator导致jquery ajax不提交
问题状态
最新活动:
2016-06-30 20:38
浏览:
14064
关注:
2
人
4 个回复
A_small_cake
赞同来自:
当表单属性验证通过后可通过remote属性来执行ajax请求到后台验证! 不知道为啥官方下载的DEMO都不行!
知道的大虾帮忙解答下,谢谢!
下面例子就是官方demo中的
<!DOCTYPE html>
<html>
<head>
<title>BootstrapValidator demo</title>
<link rel="stylesheet" href="../vendor/bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" href="../dist/css/bootstrapValidator.css"/>
<script type="text/javascript" src="../vendor/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../vendor/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../dist/js/bootstrapValidator.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<!-- form: -->
<section>
<div class="page-header">
<h1>Sign up</h1>
</div>
<div class="col-lg-8 col-lg-offset-2">
<form id="defaultForm" method="post" class="form-horizontal" action="target.php">
<div class="form-group">
<label class="col-lg-3 control-label">Username</label>
<div class="col-lg-5">
<input type="text" class="form-control" name="username" autocomplete="off" />
</div>
</div>
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
</div>
</section>
<!-- :form -->
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#defaultForm').bootstrapValidator({
message: 'This value is not valid',
// live: 'disabled',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
username: {
message: 'The username is not valid',
validators: {
notEmpty: {
message: 'The username is required and can\'t be empty'
},
remote: {
type: 'POST',
url: 'remote.php',
message: 'The username is not available',
delay: 1000
}
}
}
}
});
});
</script>
</body>
</html>
A_small_cake
赞同来自:
A_small_cake
赞同来自:
童言无忌
赞同来自: