燃烧的标题

来源:互联网 发布:淘宝保价是什么意思 编辑:程序博客网 时间:2024/04/28 01:38

<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>

原创粉丝点击