The method of realizing Dom Merry-go special effect with JS _javascript skill

Source: Internet
Author: User

This article illustrates the method of realizing Dom Merry-go effect by JS. Share to everyone for your reference. The implementation methods are as follows:

Copy Code code as follows:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title> merry-go Special Effects </title>
<script type= "Text/javascript" >
function Scroll () {
Assign header file headers to tit
var tit = document.title;
Gets the first character of the tit
var fir = Tit.charat (0);
Get tit the remaining characters
var left = tit.substring (1, tit.length)
Re-assign header file headers (the second character of the original title to the last character + the first character of the original object)
Document.title = left + fir;
}
Let scroll perform scroll () once every 2000 milliseconds to achieve merry-go effect
SetInterval ("Scroll ()", 2000);
</script>
<body>

</body>

I hope this article will help you with your 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.