html代碼大全 用javascript代碼來實(shí)現(xiàn)閃爍按鈕
<body>
<form method="POST" action="--WEBBOT-SELF--">
<input type="button" name=SUB value="閃爍" id=flashit style="BORDER: 1px solid ;BACKGROUND-COLOR: #FFFFFF">
</form>
<script>
if (document.all&&document.all.flashit)
{
var flashelement=document.all.flashit
if (flashelement.length==null)
flashelement[0]=document.all.flashit
function changecolor(which)
{
if (flashelement[which].style.color==`#800000`)
flashelement[which].style.color="#0063A4"
else
flashelement[which].style.color="#800000"
}
if (flashelement.length==null)
setInterval("changecolor(0)",1000)
else
for (i=0;i<flashelement.length;i++)
{
var tempvariable=`setInterval("changecolor(`+i+`)",`+`1000)`
eval(tempvariable)
}
}
</script>
</body>
點(diǎn)擊加載更多評論>>