HTML 显示器纯色亮点检测工具

HTML 显示器纯色亮点检测工具

相关资源文件已经打包成html等文件,可双击直接运行程序,且文章末尾已附上相关源码,以供大家学习交流,博主主页还有更多Html相关程序案例,秉着开源精神的想法,望大家喜欢,点个关注不迷路!!!

1. 简介:

纯色循环显示HTML,家里经常买显示器,需要测试亮点坏点

这个是用浏览器技术做的纯色亮点测试网页工具。

用浏览器打开后按F11进全屏,一直换显示器。

使用方式:

拖进浏览器,按下F11快捷键进入全屏,退出也是F11。

闪烁时间更改:

html 复制代码
window.setInterval(swichcolor, 1000);

最后里两行 , 这里是毫秒. 1秒=1000毫秒

改好刷新就可以用了.

2. 运行效果:

3. 相关源码:

html 复制代码
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示器测试-每秒自动切换颜色</title>
</head>

<body style="height: 100%;width: 100%;"
  onLoad="javascript:window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)">

    <script>
        function formatDate(date) {
            var date = new Date(Date.now());
            var YY = date.getFullYear() + '-';
            var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
            var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
            var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
            var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
            var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
            return YY + MM + DD + " " + hh + mm + ss;
        }

        var color = 0;
        var ci = 0;

        function swichcolor() {
            switch (color) {
                case 0:
                    document.getElementsByTagName("body")[0].style.backgroundColor = '#000000';
                    color = 1;
                    console.log(`当前时间${formatDate()},脚本已经执行了${ci}次,当前:黑色`);
                    break;
                case 1:
                    document.getElementsByTagName("body")[0].style.backgroundColor = '#FF0000';
                    color = 2;
                    console.log(`当前时间${formatDate()},脚本已经执行了${ci}次,当前:红色`);
                    break;
                case 2:
                    document.getElementsByTagName("body")[0].style.backgroundColor = '#00FF00';
                    color = 3;
                    console.log(`当前时间${formatDate()},脚本已经执行了${ci}次,当前:绿色`);
                    break;
                case 3:
                    document.getElementsByTagName("body")[0].style.backgroundColor = '#0000FF';
                    color = 4;
                    console.log(`当前时间${formatDate()},脚本已经执行了${ci}次,当前:蓝色`);
                    break;
                case 4:
                    document.getElementsByTagName("body")[0].style.backgroundColor = '#FFFF00';
                    color = 5;
                    console.log(`当前时间${formatDate()},脚本已经执行了${ci}次,当前:黄色`);
                    break;
                case 5:
                    document.getElementsByTagName("body")[0].style.backgroundColor = '#00FFFF';
                    color = 6;
                    console.log(`当前时间${formatDate()},脚本已经执行了${ci}次,当前:青色`);
                    break;
                case 6:
                    document.getElementsByTagName("body")[0].style.backgroundColor = '#FF00FF';
                    color = 7;
                    console.log(`当前时间${formatDate()},脚本已经执行了${ci}次,当前:紫红色`);
                    break;
                case 7:
                    document.getElementsByTagName("body")[0].style.backgroundColor = '#C0C0C0';
                    color = 8;
                    console.log(`当前时间${formatDate()},脚本已经执行了${ci}次,当前:灰色`);
                    break;
                case 8:
                    document.getElementsByTagName("body")[0].style.backgroundColor = '#FFFFFF';
                    color = 0;
                    console.log(`当前时间${formatDate()},脚本已经执行了${ci}次,当前:白色`);
                    break;
                default:
                    break;
            }
            ci += 1;
        }

        window.setInterval(swichcolor, 1000);
    </script>
</body>
</html>
相关推荐
最好一梦2 天前
佳维视工业级显示器在数码印刷设备中的应用
计算机外设
林恒smileZAZ2 天前
用 Vue 3 + Electron 做桌宠:从启动退出到拖拽、单击与鼠标穿透
vue.js·electron·计算机外设
科创致远5 天前
第一代 e+SOP 盒子配显示器实测:物美价廉的产线可视化方案
大数据·网络·人工智能·信息可视化·计算机外设·制造·精益工程
硅基手札6 天前
SPI技术系列 08 · SPI 控制器寄存器与 IP 架构
驱动开发·stm32·单片机·嵌入式硬件·mcu·架构·计算机外设
hflmwl88 天前
wizmouse鼠标增强工具中文版下载
计算机外设·wizmouse鼠标增强工具·wizmouse中文版下载·wizmouse下载·wizmouse中文版·wizmouse·wizmouse工具
誰能久伴不乏8 天前
卸载博图 TIA Portal 后,我的键盘全灭了一次
计算机外设·电脑
开开心心就好10 天前
手机虚拟化学实验室,混合燃烧都能模拟
jupyter·智能手机·ffmpeg·计算机外设·电脑·音视频·visual studio
开开心心就好10 天前
手机电池健康怎么查?看容量温度循环次数
spring·智能手机·ffmpeg·计算机外设·电脑·maven·音视频
开开心心_Every11 天前
文件查重软件批量删除重复文件释放空间
java·开发语言·c#·计算机外设·ocr·excel·perl
雪碧透心凉_12 天前
PythonWin32API窗口与鼠标操作
开发语言·python·计算机外设