如何禁用jquery移动弹出窗口的关闭

how can i disable closing of jquery mobile popup

本文关键字:窗口 何禁用 jquery 移动      更新时间:2023-09-26

我喜欢使用jquery mobile来构建web应用程序。当我在这里使用"jquery mobile signin popup"时:http://jquerymobile.com/demos/1.3.0-rc.1/docs/demos/widgets/popup/

我喜欢自定义预先加载的登录弹出窗口,用户无法关闭它。就像HTML中的静态表单一样。因为没有弹出或取消弹出,用户无法登录和使用服务。我该怎么做??

感谢您的时间,这里是注册弹出窗口的来源。

<a href="#popupLogin" data-rel="popup" data-position-to="window" data-role="button" data-inline="true" data-icon="check" data-theme="a" data-transition="pop">Sign in</a>
<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" data-icon="check">Sign in</button>
        </div>
    </form>
</div>

您可以使用dismissible属性。

设置是在弹出窗口外单击还是在弹出窗口打开将关闭弹出窗口。此选项也作为数据属性:数据可忽略="false"

代码:

<div data-role="popup" id="popupLogin" data-theme="a" class="ui-corner-all" data-dismissible="false">

文档:http://jquerymobile.com/demos/1.3.0-beta.1/docs/pages/popup/options.html#

演示:http://jsfiddle.net/IrvinDominin/7yqkd/

只需添加

data-dismissible="false"

到弹出的