美文网首页
编程测试文章

编程测试文章

作者: 天空之镜_d18e | 来源:发表于2018-08-14 21:39 被阅读0次
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            border: 1px solid #c93939;
            background-color: chartreuse;
        }

        input {
            margin: 8px 0;
        }
    </style>
</head>

<body>
    <input type="button" value="开始" id="btn1">
    <input type="button" value="结束" id="btn2">
    <div id="dv"></div>
</body>
<script>
    var btn1 = document.getElementById("btn1");
    var btn2 = document.getElementById("btn2");
    var dv = document.getElementById("dv");

    function getColor() {
        var str = "#";
        var arr = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "f"];
        for (var i = 0; i < 6; i++) {
            var num = parseInt(Math.random() * 16);
            str += arr[num];
        }
        dv.style.backgroundColor=str;
    }

    btn1.onclick = function () {
        timeId=setInterval("getColor()",100);
    }
    btn2.onclick = function () {
        clearInterval(timeId);
        timeId=null;
    }
</script>

</html>

相关文章

  • 编程测试文章

  • 测试员的算法面试题-找众数

    本文章出自【码同学软件测试】 算法面试—找众数 前提: 现在测试工程师的面试,或多或少都会问到编程技术.在编程技术...

  • 测试

    TDD:测试驱动编程,编程方法学,编程思想 先写测试用例,再编码。 单元测试、压力测试、疲劳强度测试(长期稳定运行...

  • 测试文章

    测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测...

  • 测试文章

    测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测...

  • 2022-04-27 测试文章

    测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测试文章测...

  • 保龄球编程读后感

    测试驱动编程: 1.测试驱动编程:在编写功能之前先编写测试代码,然后只编写使测试通过的功能代码, 通过测试来驱...

  • 11.1

    项目(独立性分析)✔️ 翻译❌ 比赛✔️ ML学习+复习计划制定(SVM结束+编程)✔️ 软件测试准备(读文章)❌

  • 测试文章测试文章

    测试文章测试文章测试文章测试文章

  • 测试文章测试文章

    测试文章的内容测试文章的内容

网友评论

      本文标题:编程测试文章

      本文链接:https://www.haomeiwen.com/subject/qjebbftx.html