简体   繁体   English

使用Java脚本点击一个图像/按钮后,显示加载图片

[英]Display loading image after clicking on a image/button using java script

I have developed an App using PhoneGap and JqueryMobile. 我已经使用PhoneGap和JqueryMobile开发了一个应用程序。 I have many HTML Pages , navigation from One page to other page on click of the image is taking lot of time.And the end user have no clue what is happening at the back end. 我有很多HTML页面,单击图像从一个页面导航到另一页面会花费很多时间,而最终用户不知道后端发生了什么。 I would like to show loading image until the page gets loaded. 我想显示加载图像,直到页面被加载。

I'm wondering how could I use Jquery to show a simple "Loading..." on the screen until page is loaded. 我想知道如何使用Jquery在屏幕上显示一个简单的“ Loading ...”,直到页面被加载。

Please help me on this. 请帮我。

With jquerymobile you can do this with $.mobile.showPageLoadingMsg() resp. 使用jquerymobile,您可以使用$.mobile.showPageLoadingMsg() resp做到这一点。 $.mobile.hidePageLoadingMsg() as described in the documentation . $.mobile.hidePageLoadingMsg()文档中所述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM