enter image description hereformValidation不阿賈克斯
這是從JavaScript我的代碼提交,當我試圖做一個HTTP POST pettition這個發送數據作爲HTTP GET。
點後發送路徑爲GET HTTP。
這是我的HTML表單的客戶:
<!-- form to client -->
<form id="formClient" class="form-horizontal form-label-left">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
<span class="section">Informacion Personal</span>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="telephone">Telefono <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="text" name="phone" data-fv-integer-message="The value is not an integer" placeholder="Telefono" class="form-control col-md-7 col-xs-12"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Nombre del Cliente <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="name" placeholder="Nombre" type="text"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="lastname">Apellidos <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input class="form-control col-md-7 col-xs-12" name="lastname" placeholder="Apellidos" type="text"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="city">Ciudad <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<select name="city" class="form-control">
<option value="">Seleccione..</option>
<option value="Cartago">Cartago</option>
<option value="Heredia">Heredia</option>
<option value="Alajuela">Alajuela</option>
<option value="Limon">Limon</option>
<option value="San Jose">San jose</option>
<option value="Puntarenas">Puntarenas</option>
<option value="Alajuela">Guanacaste</option>
</select>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="email">Correo <span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="email" name="email" placeholder="Correo" class="form-control col-md-7 col-xs-12"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="state">Permitir Fiado <span class="required"></span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="checkbox" name="guarantor" class="js-switch" checked="checked" /> Fiado
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="state">Usuario <span class="required"></span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="checkbox" name="state" class="js-switch" checked="checked" /> Activo
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
<button id="sendClient" type="submit" class="btn btn-success">Guardar Cliente</button>
</div>
</div>
</form>
<!-- /form to client -->
告訴我們您的標記'
有它的HTML表單 –