欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

JS按鈕閃爍功能的實(shí)現(xiàn)代碼

 更新時(shí)間:2017年07月21日 16:59:14   作者:停留就好  
js按鈕閃爍功能的實(shí)現(xiàn)代碼分為html和js兩部分代碼,具體實(shí)現(xiàn)代碼大家參考下本文

html

<body onload="blinklink()" onunload="stoptimer()">
  <a href="javascript:;" rel="external nofollow" class="iforeginbtn" id="flashit">馬上注冊(cè)領(lǐng)取</a>
</div>

js

var flashit=document.getElementById('flashit');
function blinklink(){
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);
}
function stoptimer(){
  clearTimeout(timer);
}

總結(jié)

以上所述是小編給大家介紹的JS按鈕閃爍功能的實(shí)現(xiàn)代碼,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論