我有一个带有表单的JQuery Mobile对话框:
<form action="send" method="post">
<input type="text"/>
<input type="submit" />
</form>
我想要的是,在提交表单时,我只想关闭对话框或返回上一页。如何使用JQM。
答案 0 :(得分:0)
尝试将下一个样本调整到您的解决方案:
<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>