_javascript Techniques of dynamic text transformation implemented by JavaScript
Source: Internet
Author: User
The effect code for implementing the text fade appears as follows:
<script>
<!--
function Helparray (len) {This.length=len}
helptext= New Helparray (5)
Helptext[0]= "Viewpoint Flash Guest"
Helptext[1]= "Wisdom is boundless"
helptext[2]= "Charm Unlimited"
Helptext[3]= "1.2 billion Chinese favorites"
helptext[4]= "Http://visionflash.blog.sohu.com"
Scripttext=new Helparray (5)
* Defines the text array, which is a five-paragraph text *//
var i =-1
function Playhelp () {
if (i==4) {i=0}
else {i++}
Div1.filters[0].apply ()
Div1.innertext=helptext[i]
Div1.filters[0].play ()
Mytimeout=settimeout ("Playhelp ()", 2500)}
* Defines the play function and sets the time interval *//
-->
</script>
<style> <!--
#div1 {position:absolute;top:20;left:20;width:480;height:200;
Font-family: The line of the calligraphy; color:red;font-size:40;
Font-weight:bold;text-align:center;
Filter:revealtrans (transition=12,duration=2)}
* Set Display conversion filter *//
-->
</style> <body onload= "Playhelp ()" >
<div id= "Div1" onload= "Playhelp ()" > </div>
</body>
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