Jquery mask the ShowLoading component

Source: Internet
Author: User

Jquery mask the ShowLoading component

1. Meaning

In a development project, the front-end page needs to send a request to the server, and the server returns data to the front-end in response to the request. During this time, the front-end page may have a transient wait because of the large amount of data returned, in this case, if you click it without your knowledge, it may cause logical confusion. Therefore, you need to load the data by prompting the front-end to load the data. You can use the jquery mask component to complete this function.


2. Implementation steps

(1)、download the showloading.css jquery. showLoading. min. js files.

(2) introduce these two files in jsp

 <Script type = "text/javascript" src = "js/jquery. showLoading. min. js"> </script>

(3) Use This component in asynchronous requests

Function showloading (url, data) {$ ("body "). showLoading (); $. ajax ({url: url, data: data, dataType: "json", success: function (obj) {$ ("body "). hideLoading ();}});}


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.