Page load loading (. NET)

Source: Internet
Author: User

C#:

protected Override voidOnInit (EventArgs e) {Response.Write ("<div id= ' mydiv ' >_</div>"); Response.Write ("<script type= ' text/javascript ' >document.getelementbyid (' mydiv '). InnerHTML = '  ';</script>"); Response.Write ("<script type= ' text/javascript ' >"); Response.Write ("function showwait () {}"); Response.Write ("function startshowwait () {document.getElementById (' mydiv '). Style.display = ';}"); Response.Write ("startshowwait ();"); Response.Write ("</script>"); Response.Flush ();}

Html:

document.getElementById (' Mydiv '). Style.display = "None";
================================================== Mencius ' Progress effect:
Response.Write ("<div id= ' mydiv ' >"); Response.Write ("_"); Response.Write ("</div>"); Response.Write ("<script>mydiv.innertext = ';</script>"); Response.Write ("<script language=javascript>;"); Response.Write ("var dots = 0;var Dotmax = 10;function showwait ()"); Response.Write ("{var output; output = ' loading page ';d ots++;if (Dots>=dotmax) Dots=1;"); Response.Write ("For (var x = 0;x < dots;x++) {output + = ';} Mydiv.innertext = output;}"); Response.Write ("function startshowwait () {mydiv.style.visibility = ' visible ';"); Response.Write ("window.setinterval (' showwait () ', +);}"); Response.Write ("function hidewait () {mydiv.style.visibility = ' hidden ';"); Response.Write ("window.clearinterval ();}"); Response.Write ("startshowwait ();</script>"); Response.Flush (); Thread.Sleep (10000);

Page load loading (. net)

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.