Jquery mobile 带有表单的Jquery移动对话框

Jquery mobile 带有表单的Jquery移动对话框,jquery-mobile,Jquery Mobile,我有一个JQuery Mobile对话框,上面有一个表单: <form action="send" method="post"> <input type="text"/> <input type="submit" /> </form> 我想要的是,当表单提交时,我只想关闭对话框或返回上一页。如何使用JQM进行此操作。尝试将下一个样本调整到您的解决方案: <div data-role="popup" id="popup

我有一个JQuery Mobile对话框,上面有一个表单:

<form action="send" method="post">
    <input type="text"/>
    <input type="submit" />
</form>

我想要的是,当表单提交时,我只想关闭对话框或返回上一页。如何使用JQM进行此操作。

尝试将下一个样本调整到您的解决方案:

    <div data-role="popup" id="popupLogin" data-theme="a" class="ui-corner-all">
        <form>
            <div style="padding:10px 20px;">
              <h3>Please sign in</h3>
              <label for="un" class="ui-hidden-accessible">Username:</label>
              <input type="text" name="user" id="un" value="" placeholder="username" data-theme="a" />

              <label for="pw" class="ui-hidden-accessible">Password:</label>
              <input type="password" name="pass" id="pw" value="" placeholder="password" data-theme="a" />

              <button type="submit" data-theme="b">Sign in</button>
            </div>
        </form>
    </div>

不,我认为对话没有形式。