Easyui splash screen Easyui page load hint (principle + code + Effect chart) _javascript tips

Source: Internet
Author: User

When using Easyui, there is a frequently encountered problem, the page has not finished rendering, it shows.

Just began to be very confusing, wait for the load to complete, just fine.

$.parser.oncomplete, this is the event that is executed after all component parsing is complete. In fact, this event is very useful. There is always a problem when layout is used to Easyui. Is that when you enter the main interface, the page is not immediately displayed, but there will be a chaotic process, and then a flash is good.

In fact, this is because the Easyui is in the DOM after the completion of the entire page parsing, when your layout and components used more, the complete parsing component requires a process, and in this process there will be a brief interface chaos phenomenon.

To solve this problem, just take advantage of the OnComplete event in conjunction with a load mask to solve the problem.

Put the desired animation effect into a page.

< #include "common/loadingdiv.html"/> (Freemarker include syntax, template used. html suffix)

Loadingdiv.html

<div id= ' loadingdiv ' style= ' position:absolute; z-index:1000; top:0px; left:0px; 
width:100%; height:100%; Background:white; Text-align:center; " > 

The above content is small series to introduce the Easyui splash screen easyui page loading tips, I hope that the above help!

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.