码迷,mamicode.com
首页 > 编程语言 > 详细

javascript如何使页面文字闪烁

时间:2015-06-19 10:28:18      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:javascrpit   页面文字闪烁   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>无标题文档</title> 
<script language="JavaScript"> 
    n=false;   
 function flash(txtId){ 
    n=!n; 
    (n)?(txtId.runtimeStyle.color=‘blue‘):(txtId.runtimeStyle.color=‘red‘); 
    } 
</script> 
<script> 
setInterval(function(){blink.color=blink.color==‘#0000ff‘?‘red‘:‘blue‘},100) 
</script> 

</head> 

<body> 
    <center><br /> 
    <script language="JavaScript">setInterval(‘flash(blink0)‘,500)</script> 
    <font id="blink0" color="blue">闪烁1</font> 
    <script language="JavaScript">setInterval(‘flash(blink1)‘,500)</script> 
    <font id="blink1" color="blue">闪烁2</font> 
    <script language="JavaScript">setInterval(‘flash(blink2)‘,500)</script> 

</body> 
</html> 

javascript如何使页面文字闪烁

标签:javascrpit   页面文字闪烁   

原文地址:http://blog.csdn.net/fuyuwei2015/article/details/46558365

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!