燃燒的標題

<html>
<head>
<style>
h1
{
width:400;
}
</style>


</head>

<body>
<h1 id="myHeader" onmouseover="back()" onmouseout="glow()">Mouse over this header</h1>
<script type="text/javascript">

var i=0;
interval=setInterval("makeglow()",10);
function glow(){
 i=0;
 interval=setInterval("makeglow()",10);
}

function back(){
 if (window.interval){
  clearInterval(interval);
 }
 document.getElementById('myHeader').style.filter=false;
}

function makeglow(){
 i++;
 if (i<5){
  document.getElementById('myHeader').style.filter="glow(strength=" + i + ")";
 }else if (window.interval){
  clearInterval(interval);
 }
}
</script>

</body>

</html>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章