源代码
百度云
code.aliyun
git clone git@code.aliyun.com:dalao/BootstrapvalidatorDemo.git
一、 目的
使用Bootstrapvalidator插件完成对表达的验证
二、 过程
2.1 效果
2.2 结构
2.3 head
注意依赖文件的路径需根据自己实际下载文件路径进行修改,网上教程中的代码无法直接使用往往就是因为依赖库没处理好
<head>
<title></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>
<style>
.container {
width: 500px;
height: 1000px;
}
</style>
</head>
2.4 body
<body>
<div class="container">
<div class="row">
<!-- form: -->
<section>
<div class="col-lg-8 col-lg-offset-2">
<div class="page-header">
<h2>注册</h2>
</div>
<form id="defaultForm" method="post" class="form-horizontal" action=