填写完表单后,我有一个pop弹出窗体(验证),然后它将调用另一个弹出窗体 这是我的表格:
<form class="form-horizontal" action="#" method="post" name="mobnumber" enctype="multipart/form-data" id="frm-otp" style="display:none;">
<div class="form-groups">
<div class="col-sm-12">
<input type="text" class="form-control" id="mobileNumber" placeholder="otp" name="mobileNumber" required="required">
</div>
</div>
<div class="form-groups">
<div class=" col-sm-12 text-center">
<!-- <button type="submit" class="btn btn-info">SEND OTP</button>-->
<input type="submit" value="SendOTP'" id="submit" class="btn btn-info" data-toggle="modal" >
</div>
</div>
</form>
OTP弹出窗体
<!--enter otp-->
<div class="modal fade" id="enter-otp" role="dialog">
<div class="modal-dialog ">
<div class="modal-body">
<form action="ex1.php" method="post" name="otp" enctype="multipart/form-data" novalidate="novalidate">
<div class="form-group">
<input class="form-control" name="userotp" id="userotp" minlength="5" maxlength="5" required="required" placeholder="Enter OTP"
aria-required="true" type="text">
</div>
<input name="loginOTP" value="1" type="hidden">
<div class="form-group text-center">
<input class="btn btn-info" value="Verify" type="submit">
</div>
</form>
</div>
</div>
</div>
<!--enter otp form end-->
Popup调用正常,但我想验证该表单形式,然后将调用弹出窗口,但验证不是只调用弹出调用.. 如何使用jquery ajax验证另一个带弹出和提交的表单后调用弹出窗口...........我的意思是在点击第一个表单中的id提交后再打开其他弹出窗口(id = enter-otp)
的Ajax:
$(document).ready(function(){
alert("fsdg");
$("#frm-otp").submit(function() {
var mobnum = $(this).val('mobileNumber');
$.ajax({
type: "POST",
url: "<?php echo base_url('verify-mobilenumber'); ?>",
data: {mobnum: mobnum},
success: function(data) {
alert("Form With PopUp Opened");
}
});
});
});
我想在第二个弹出窗口中显示手机号码。如何在此功能中添加弹出窗口