单击“提交”按钮时,我需要帮助关闭SimpleModal弹出窗口。此按钮所在的页面是弹出SimpleModal中的iframe。以下页面的代码。
<form action="#" method="post" id="mc-form">
<div id="mc">
<p>Por favor desenha a forma no quadro abaixo ou gere uma nova forma: (<a onclick="window.location.reload()" href="#" title="Clique para Gerar um novo Captcha">Gerar</a>)</p>
<canvas id="mc-canvas">
Your browser doesnt support the canvas element - please visit in a modern browser.
</canvas>
<input type="hidden" id="mc-action" value="posclick.php"/>
</div>
<p><input disabled="disabled" autocomplete="false" type="submit" value="Seguir"></p>
</form>
答案 0 :(得分:0)
一种简单的方法是在提交表单时从dom中删除表单
$("#mc-form").submit(function() {
$(this).remove();
});