###第三题

第三题

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Document</title>

    <style>

        *{

            margin: 0;

            padding: 0;

        }

        .c button{

            width: 120px;

            height: 35px;

            margin: 0 50px;

        }

        .c{

            text-align: center;

        }

        .b{

            width: 500px;

            height: 200px;

            margin: 0 auto;

            text-align: center;

            line-height: 200px;

            font-size: 40px;

        }

    </style>

</head>

<body>

    <div>

        <div class="b"></div>

    </div>

    <div class="c">

        <button class="start">开始</button>

        <button class="end">结束</button>

    </div>

    <script>

        const arr=['24210704李晓熙',

'24210716魏冕',

'242108111盛健翔',

'24210822周锦浩',

'24210827  谢琦原',

'24210829 罗俊',

'24220102马佳瑶',

'24220107赵佳雨',

'24220108 钟佳豪',

'24220110孙双峰',

'24220115朱哲轩',

'24220211肖龙臻',

'24220216吴佳乐',

'24220223张经纬',

'24220305李沛津',

'24220306 赵玥',

'24220416 冯明哲',

'24220506凌伟鲜',

'24220604陈飞洋',

'24220616朱宇轩',

'24220618刘星宇',

'24220625赵虔诚',

'24220705董馨阳',

'24220709朱青',

'24220801严晶晶',

'24220808魏依豪',

'24230116郑秉贺',

'24230224郭泽汐',

'24230423盛长浩',

'24240110徐骏雯',

'24250215闫继增',

'24250101智奕然',

'24250105徐淼',

'24250107 史辰菲',

'24250117王宇航',

'24250205谢雨欣',

'24250206肖玉玲',

'24250219李星翰',

'24250224朱阳光',

'24250308张季雨',

'24250312 许沈亦佳',

'24250328钱志豪',

'24250329彭梓睿',

'24250410朱雨婷',

'24260103张艺颖',

'24260107刘禧玥',

'24260108张栩清',

'24260109朱鑫怡',

'24260110孙明珠',

'24260122文熙睿',

'24260125赵福林']

        const start = document.querySelector('.start')

        const b = document.querySelector('.b')

        const end = document.querySelector('.end')

        let js = 0

        start.addEventListener('click',function(){

            js = setInterval(function(){

                const random = parseInt(Math.random()*arr.length)

                b.innerHTML = arr[random]

            },35)

        })

        end.addEventListener('click',function(){

            clearInterval(js)

        })

    </script>

</body>

</html>

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值