每当我尝试填写登录表单(这是一个巨大的弹出 ajax 框)时,它都会在第一次单击时关闭。
main.html
$(document).ready(function() {
$('.ajax-popup-link').magnificPopup({
type: 'ajax',
alignTop: false,
overflowY: 'scroll'
});
});
<a class="simple-ajax-popup-align-top" href="result.php">try me</a><br>
结果.php
<div>
<form action="..." method="post">
Email:
<label class="field_container">
Password:
<input type='text' name='cust_username' id='username' maxlength="12" style="width: 250px; height: 30px" /></label>
<label class="field_container">
Password:
<input type='password' name='cust_password' id='password' maxlength="12" style="width: 250px; height: 30px" /></label>
<input type='submit' name='Submit' value='Login' />
</form>
</div>