【题解】第十三届蓝桥杯Web开发省赛解题思路——灯的颜色变化
本文最后更新于 719 天前,其中的信息可能已经有所发展或是发生改变。

介绍

效果

解题思路

这题没啥好说的,上代码:

// TODO:完善此函数 显示红色颜色的灯
function red() {
    document.getElementById('defaultlight').style = 'display:none;';
    document.getElementById('greenlight').style = 'display:none;';
    document.getElementById('redlight').style = 'display:inline-block;';
}

// TODO:完善此函数  显示绿色颜色的灯
function green() {
    document.getElementById('defaultlight').style = 'display:none;';
    document.getElementById('redlight').style = 'display:none;';
    document.getElementById('greenlight').style = 'display:inline-block;';
}

// TODO:完善此函数
function trafficlights() {
    setTimeout(() => {
        red()
        setTimeout(() => {
            green()
        }, 3000);
    }, 3000);
}
转载请注明出处!本文链接: https://battlehawk233.cn/post/830.html



暂无评论

发送评论编辑评论

|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇