JS按钮闪烁功能的实现代码
html
马上注册领取
js
varflashit=document.getElementById('flashit'); functionblinklink(){ if(flashit.style.backgroundColor=='rgb(232,83,63)'){//注意:这里拿到的是rgb格式的 flashit.style.backgroundColor='#485fbd'; }else{ flashit.style.backgroundColor='rgb(232,83,63)'; } timer=setTimeout("blinklink()",300); } functionstoptimer(){ clearTimeout(timer); }
总结
以上所述是小编给大家介绍的JS按钮闪烁功能的实现代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对毛票票网站的支持!