<html>
<head>
<style type="text/css">
font { font-size:10em; }
</style>
<script>
var array=["red","yellow","green"];
var cnt=0;
window.onload=function(){
ff();
}
function ff(){
if(cnt==3) cnt=0;
f.style.color=array[cnt++];
setTimeout("ff()",500);
}
</script>
</head>
<body>
<font id="f">글자</font>
</body>
</html>
'개발하자 > 자바스크립트' 카테고리의 다른 글
setTimeout(1회호출)을 이용하여 한글자씩 증가or감소시키기 (0) | 2015.02.17 |
---|---|
현재 시스템의 초count 하기 (0) | 2015.02.17 |
카운트시작과 멈춤 setTimeout(),clearTimeout() (0) | 2015.02.17 |
선택한 년월을 이용하여 요일구하기 (0) | 2015.02.17 |
select option for문으로 생성하기 (0) | 2015.02.17 |