点击jQuery Mobile的提交按钮后,如何显示“加载”?

时间:2022-03-18 20:46:05

I'm using the jQuery Mobile javascript library. In my form, I can't seem to acheive what this form is doing. After I click on the Submit button. I want the user to see the 'loading' pop up.

我正在使用jQuery Mobile javascript库。在我的形式中,我似乎无法实现这种形式的作用。点击“提交”按钮后。我希望用户看到弹出的“加载”。

1 个解决方案

#1


1  

Imporant

Please note the following comment by Michael Kariv:

请注意Michael Kariv的以下评论:

deprecated, at least in jqm 1.3.2, may be earlier. looking into the code reveals

弃用,至少在jqm 1.3.2中,可能更早。调查代码揭示

showPageLoadingMsg: function( theme, msgText, textonly ) {
    $.mobile.loading('show', theme, msgText, textonly );
}

The original answer was:

最初的答案是:


$('#yourform').submit(function(){
    $.mobile.showPageLoadingMsg(); // http://jquerymobile.com/test/docs/api/methods.html
})

Hiding the message again: $.mobile.hidePageLoadingMsg();

再次隐藏消息:$ .mobile.hidePageLoadingMsg();

#1


1  

Imporant

Please note the following comment by Michael Kariv:

请注意Michael Kariv的以下评论:

deprecated, at least in jqm 1.3.2, may be earlier. looking into the code reveals

弃用,至少在jqm 1.3.2中,可能更早。调查代码揭示

showPageLoadingMsg: function( theme, msgText, textonly ) {
    $.mobile.loading('show', theme, msgText, textonly );
}

The original answer was:

最初的答案是:


$('#yourform').submit(function(){
    $.mobile.showPageLoadingMsg(); // http://jquerymobile.com/test/docs/api/methods.html
})

Hiding the message again: $.mobile.hidePageLoadingMsg();

再次隐藏消息:$ .mobile.hidePageLoadingMsg();