Javascript implements the dynamic display of text in the status bar, javascript Status Bar

Source: Internet
Author: User

Javascript implements the dynamic display of text in the status bar, javascript Status Bar

This article describes how to use javascript to dynamically display text in the status bar. We will share this with you for your reference. The details are as follows:

<Script> var child = window. open ("information.html", "_ blank", "width = 200, height = 200, toolbar = no"); function closeChild () {if (! Child. closed) {child. close () ;}// set the interval of 1 second. Call scroll () setInterval ("scroll ()", 100) var space_num = 0; var dir = 1; // start to move the function scroll () {var str_space = ""; space_num = space_num + 1 * dir from left to right; // if the number of spaces is greater than 40 or less than 0, if (space_num> 40 | space_num <= 0) {dir = dir * (-1 );} // increase the number of spaces for (var I = 0; I <space_num; I ++) {str_space + = "" ;}// convert the number of spaces before the text window. status = str_space + "welcome to study" ;}</script> <body onunload = "closeChild ()"> </body>

I hope this article will help you design JavaScript programs.

Related Article

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.