好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

:button中文字闪烁_html/css_WEB-ITnose

刚开始学习,想触发一事件,引起按钮中的文字闪烁,能实现网页上其它字的闪烁,却操作不了按钮中的文字
代码如下:只能实现按钮旁边的文字武汉闪烁,不能改变按钮中的武汉









武汉



function blinklink() {
if (!document.getElementById('blink').style.color) {
document.getElementById('blink').style.color = "black";
}
if (document.getElementById('blink').style.color == "black") {
document.getElementById('blink').style.color = "#FFFFFF";
} else {
document.getElementById('blink').style.color = "black";
}
timer = setTimeout("blinklink()", 500);
}
function stoptimer() {
clearTimeout(timer);
}
blinklink()




回复讨论(解决方案)

       武汉  function blinklink() {    if (!document.getElementById('blink').style.color) {        document.getElementById('blink').style.color = "black";        document.getElementById('btn').style.color = "black";    }    if (document.getElementById('blink').style.color == "black") {        document.getElementById('blink').style.color = "#FFFFFF";        document.getElementById('btn').style.color = "transparent";    } else {        document.getElementById('blink').style.color = "black";        document.getElementById('btn').style.color = "black";    }    timer = setTimeout("blinklink()", 500);}function stoptimer() {    clearTimeout(timer);} blinklink()     

http://bbs.csdn.net/topics/391000303?page=1

查看更多关于:button中文字闪烁_html/css_WEB-ITnose的详细内容...

  阅读:37次