SimpleModal Popup - 用其他按钮关闭弹出窗口

时间:2013-11-11 21:13:45

标签: javascript jquery popup simplemodal

单击“提交”按钮时,我需要帮助关闭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>

1 个答案:

答案 0 :(得分:0)

一种简单的方法是在提交表单时从dom中删除表单

$("#mc-form").submit(function() {

    $(this).remove();

});