当前位置: 首页 > article >正文

刻意练习:舒尔特方格提升专注力

1.功能描述

刻意练习:舒尔特方格提升专注力

如果发现自己存在不够专注的问题,可以通过一个小游戏来提升自己专注力--舒尔特方格。

舒尔特方格的实施步骤如下:

  1. 一张纸上画出5X5的空方格。
  2. 在方格中,没有任何规律的随机填写数字1~25,每个方格填一个数字。
  3. 训练时,使用秒表计时器,按1~25的顺序,用手一次指出并念出每个数字。
  4. 数完后,结束计时,通常,25秒内完成属于中等水平,16秒内完成就是优秀。注意:练习时一定要手嘴并用,目光很容易飘忽不定,通过手指来引导目光可以避免遭受干扰。

2.代码实现

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>《西蒙学习法》5.7舒尔特方格提升专注力</title>
    <style>
        #big {
            position: absolute;
            left: 10%;
            right: 10%;
        }

        #container {
            float: left;
            width: 250px;
            border: 1px solid;

        }

        .cell {
            text-align: center;
            float: left;
            width: 50px;
            height: 50px;
            line-height: 50px;
            font-size: 20px;
            font-weight: bold;
            border: 1px solid;
            box-sizing: border-box;
        }

        button#refresh {
            margin-top: 20px;
            width: 255px;
            height: 50px;
            border-radius: 10px;
            background-color: #409EFF;
            border: #409EFF;
            color: white;
            font-size: 20px;
        }

        button#refresh:hover {
            background: #67C23A;
        }

        p {
            text-indent: 2em;
        }

        #timer {
            width: 255px;
            margin-top: 20px;
            text-align: center;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        #timer span {
            display: inline-block;
            margin: 4px;
            font-size: 20px;
            color: red;
        }

        #timer button {
            background-color: #fff;
            border-radius: 10px;
            border: 1px solid #409EFF;
            color: #67C23A;
        }

        #timer button:hover {
            background-color: #409EFF;
            color: white;
        }
    </style>
    <script>
        function refresh() {
            //创建25个元素为0的数组
            var array25 = new Array(25).fill(0);
            //获取25个格子
            var cells = document.getElementsByClassName("cell");
            //给每个格子插入不同数字
            for (var i = 0; i < 25; i++) {
                while (true) {
                    var randomNum = findRandomNum(25);
                    if (array25[randomNum] == 0) {
                        cells[i].innerHTML = randomNum + 1;
                        array25[randomNum] = 1;
                        break;
                    } else {
                        continue;
                    }
                }
            }
        }
        //先找到小于当前数组长度的一个随机数
        function findRandomNum(n) {
            return Math.floor(Math.random() * n);
        }

        var seconds = 0;
        var intervalId;

        function reset() {
            seconds = 0;
            document.getElementById("seconds").innerHTML = seconds;
        }

        function end() {
            if (intervalId) {
                clearInterval(intervalId);
            }
            document.getElementById("end").style.display = "none";
            document.getElementById("start").style.display = "inline-block";
            if (seconds <= 16) {
                document.getElementById("seconds").innerHTML = seconds + "(优秀)";
            } else if (seconds <= 25) {
                document.getElementById("seconds").innerHTML = seconds + "(中等)";
            } else {
                document.getElementById("seconds").innerHTML = seconds + "(不佳)";
            }
        }

        function start() {
            intervalId = setInterval(() => {
                seconds++;
                document.getElementById("seconds").innerHTML = seconds;
            }, 1000);
            document.getElementById("start").style.display = "none";
            document.getElementById("end").style.display = "inline-block";
        }
    </script>
</head>

<body onload="refresh()">
    <div id="big">
        <h1>刻意练习:舒尔特方格提升专注力</h1>
        <div id="container">
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
            <div class="cell"></div>
        </div>
        <div style="clear: both;">
            <button id="refresh" onclick="refresh();">刷新</button>
        </div>
        <div id="timer">
            <span id="seconds">0</span>
            <div style="padding: 5px;">
                <button id="start" onclick="start();">开始计时</button>
                <button id="end" onclick="end();" style="display: none;">结束计时</button>
                <button id="reset" onclick="reset();">重置时间</button>
            </div>
        </div>
        <p>
            如果发现自己存在不够专注的问题,可以通过一个小游戏来提升自己专注力--舒尔特方格。<br />
        <h5>舒尔特方格的实施步骤如下:</h5>
        <ol>
            <li>一张纸上画出5X5的空方格。</li>
            <li>在方格中,没有任何规律的随机填写数字1~25,每个方格填一个数字。</li>
            <li>训练时,使用秒表计时器,按1~25的顺序,用手一次指出并念出每个数字。</li>
            <li>数完后,结束计时,通常,25秒内完成属于中等水平,16秒内完成就是优秀。</li>
        </ol>
        注意:练习时一定要手嘴并用,目光很容易飘忽不定,通过手指来引导目光可以避免遭受干扰。
        </p>
    </div>
</body>

</html>

3.页面效果


http://www.kler.cn/news/310933.html

相关文章:

  • [DOM] Found 2 elements with non-unique id VUE子页面调用父页面以及父页面调用子页面的方法
  • C++中string类的模拟实现
  • JDBC 编程
  • RockPlus Prototype Lab系统,领先的汽车零部件研发实验室管理解决方案
  • Python 引用其他文件的函数
  • 网络高级day01(Modbus 通信协议)
  • 游戏如何应对云手机刷量问题
  • RockTrack:A 3D Robust Multi-Camera-Ken Multi-Object Tracking Framework
  • iptables限制网速
  • CefSharp_Vue交互(Element UI)_WinFormWeb应用(2)---置顶和取消置顶(含示例代码)
  • JAVA虚拟机----JVM
  • 园区物业水电费收取难怎么办
  • 【Java-线程池】
  • 聚焦汽车智能化与电动化,亚洲领先的汽车工业技术博览会 2025年11月与您相约 AUTO TECH 华南展
  • 【WiFi】Qualcomm WCN6856 进入FTM操作说明
  • 初识网络编程
  • 多线程之CompletableFuture
  • 【模板进阶】模板的万能引用
  • 基于深度学习的图像描述生成
  • 机器学习 vs. 深度学习
  • Apple M3编译MAVSDK安卓平台SO库
  • 如何在Android上实现RTSP服务器
  • 2024/9/19 408大题专训之五段式指令流水线题型总结
  • fastson与jackson入门
  • Windows本地制作java证书(与jeecgboot配置本地证书ssl问题)
  • 基于vue框架的宠物领养管理系统88v55(程序+源码+数据库+调试部署+开发环境)系统界面在最后面。
  • Python 数学建模——傅里叶变换时间序列分析
  • LeetCode 算法笔记-第 04 章 基础算法篇
  • Docker vs. containerd 深度剖析容器运行时
  • 【kafka-01】kafka安装和基本核心概念