我在Bootstrap模式中有一个联系表单,我希望在表单提交时,模态隐藏,使用“淡入淡出”动画。但是,当我向“提交”按钮添加data-dismiss="modal"
时,表单不会提交。
HTML:
<div class="modal fade cont">
<div class="modal-dialog">
<form action="form.php" method="POST">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">Contact</h4>
</div>
<div class="modal-body">
<p>Name:
<input type="text" autofocus name="name" id="name" class="form-control" id="fd">
</p>
<p>Email:
<input type="email" name="email" id="email" class="form-control" />
<div class="input-group">
<span class="input-group-addon">
<input type="checkbox" aria-label="..." name="copy">
</span>
<input type="text" readonly disabled class="form-control" aria-label="" value="Check here for a copy of your message." style="border:1px solid #ccc !important;cursor:default !important;" />
</div>
</p>
<p>Message:
<textarea class="form-control" id="msg" name="msg" style="height:175px;"></textarea>
</p>
</div>
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-default">Cancel</button>
<input type="submit" data-dismiss="modal" class="btn btn-primary" />
</div>
</div>
</form>
</div>
</div>
当“淡入淡出”隐藏时,如何使表单提交 Page 点击导航栏中的联系人链接。
答案 0 :(得分:0)
你可以这样:
var empId = getParameterByName('EmpId');