JavaScript implementation of text dynamic display in status bar _javascript tips

Source: Internet
Author: User

This article illustrates the method for dynamically displaying the text in the status bar of JavaScript implementation. Share to everyone for your reference, specific as follows:

<script>
 var child = window.open ("information.html", "_blank", "width=200,height=200,toolbar=no");
 function Closechild () {
 if (!child.closed) {
  child.close ()
 }} Set interval of 1 seconds, call once scroll ()
 setinterval ("scroll ()", MB)
 var space_num = 0;
 var dir = 1; Text starts moving from left to right
 function scroll () {
 var str_space = "";
 Space_num = Space_num + 1*dir;
 If the number of spaces is greater than 40 or less than 0 o'clock if
 (Space_num > | | space_num <= 0) {
  dir = dir * ( -1);
 }
 The number of spaces is increased for
 (var i=0 i<space_num; i++) {
  Str_space + = "";
 }
 The number of spaces before the text transforms
 window.status = Str_space + "Welcome to study";
 }
</script>
<body onunload= "Closechild ()" >
</body>

I hope this article will help you with JavaScript programming.

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.