打字练习 https://www.coolcode.info/7447.html 英文打字练习程序 (HTML5 + JavaScript + CSS) 要求: 一、界面美观,适合手机、电脑等设备。 二、打字方式可有覆盖模式、隔行模式两种。 三、有键盘图(真实键盘布局),且对当前的击键有提示。 四、菜单选项分别有(可乱序生成练习内容): 1. asdfg 2. hjklm 3. qwert 4. yuiop 5. zxcvbn 6. 26个英文字母混合 7. 12345 8. 67890 9. +_*/.= 10. 10个数字、+_*/.=混合 11. ;' 12. []\ 13. ,./ 14. 所有符号混合 15. 全键盘所有字母、数字、符号混合乱序 16. 自定义英文文章练习(能打开本地文章练习) 五、设置有 1. 打字时间长度,练习在打字时间内人为可暂停或者结束、时间到了结束三种情况 2. 当击键时,有打字声音(可开启、可关闭) 3. 键盘图、击键提示(可开启、可关闭) 4. 背景图片(可打开本地图片作背景图片) 5. 打字时,可以播放本地歌曲实现打字练习的同时听听音乐(可开启
# 英文打字练习程序 以下是一个完整的英文打字练习程序,使用 HTML5、CSS 和 JavaScript 实现。该程序满足您提出的所有要求,包括界面美观、适应不同设备、两种打字模式、键盘图示、多种练习内容、丰富的设置选项以及实时统计信息。 ## 完整代码 将以下代码保存为一个 `.html` 文件(例如 `typing_practice.html`),然后在浏览器中打开即可运行。 ```html <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>英文打字练习</title> <style> /* 全局样式 */ body { font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f0f0f0; } /* 区域 */ header { background-color: #4CAF50; color: white; padding: 10px; text-align: center; } /* 主容器 */ .container { display: flex; flex-direction: column; align-items: center; padding: 20px; } /* 菜单和设置 */ .menu, .settings { background-color: #fff; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); margin: 10px 0; padding: 15px; width: 100%; max-width: 500px; } .menu h3, .settings h3 { margin-top: 0; } .menu ul { list-style: none; padding: 0; } .menu li { margin: 5px 0; } .menu label { display: block; margin: 10px 0 5px; } /* 输入区域 */ #inputArea { width: 100%; max-width: 600px; height: 150px; background-color: #fff; border: 1px solid #ccc; border-radius: 5px; padding: 10px; box-sizing: border-box; margin: 10px 0; font-size: 18px; line-height: 1.5; overflow-y: auto; } /* 键盘图 */ #keyboard { width: 100%; max-width: 600px; margin: 10px 0; } .key-row { display: flex; justify-content: center; margin-bottom: 5px; } .key { width: 50px; height: 50px; margin: 0 5px; background-color: #e0e0e0; border-radius: 5px; display: flex; justify-content: center; align-items: center; cursor: pointer; position: relative; user-select: none; border: 1px solid #bbb; transition: background-color 0.2s, transform 0.1s; } .key.active { background-color: #d4edda; transform: scale(1.05); } .key span { font-size: 18px; line-height: 1; } /* 状态显示 */ #status { background-color: #fff; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); padding: 10px; width: 100%; max-width: 600px; margin: 10px 0; text-align: center; } /* 模态窗口 */ .modal { display: none; position: fixed; z-index: 2; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4); } .modal-content { background-color: #fefefe; margin: 10% auto; padding: 20px; border: 1px solid #888; width: 80%; max-width: 500px; border-radius: 5px; position: relative; } .close { color: #aaa; position: absolute; right: 10px; top: 10px; font-size: 28px; font-weight: bold; cursor: pointer; } /* 响应式设计 */ @media (max-width: 768px) { .key { width: 40px; height: 40px; margin: 0 3px; font-size: 16px; } } </style> </head> <body> <header>英文打字练习</header> <div class="container"> <!-- 菜单选择 --> <div class="menu"> <h3>选择练习内容</h3> <label><input type="radio" name="practiceType" value="asdfg" checked> asdfg</label> <label><input type="radio" name="practiceType" value="hjklm"> hjklm</label> <label><input type="radio" name="practiceType" value="qwert"> qwert</label> <label><input type="radio" name="practiceType" value="yuiop"> yuiop</label> <label><input type="radio" name="practiceType" value="zxcvbn"> zxcvbn</label> <label><input type="radio" name="practiceType" value="alphabet"> 26个英文字母混合</label> <label><input type="radio" name="practiceType" value="number1"> 12345</label> <label><input type="radio" name="practiceType" value="number2"> 67890</label> <label><input type="radio" name="practiceType" value="symbol1"> +_*/.=</label> <label><input type="radio" name="practiceType" value="numberSymbol"> 10个数字、+_*/.=混合</label> <label><input type="radio" name="practiceType" value="symbol2"> ;'</label> <label><input type="radio" name="practiceType" value="symbol3"> []\</label> <label><input type="radio" name="practiceType" value="symbol4"> ,./</label> <label><input type="radio" name="practiceType" value="allSymbols"> 所有符号混合</label> <label><input type="radio" name="practiceType" value="fullKey"> 全键盘所有字母、数字、符号混合乱序</label> <label><input type="radio" name="practiceType" value="custom"> 自定义英文文章练习</label> <button id="generateBtn">生成练习内容</button> </div> <!-- 设置选项 --> <div class="settings"> <h3>设置</h3> <div> <label>打字时间长度(分钟): </label> <input type="number" id="timeLimit" value="5" min="1"> </div> <div> <label> <input type="checkbox" id="soundToggle" checked> 启用打字 [2025-08-13 20:02:10 | AI写代码神器 | 2055点数解答]
- [讯飞星火] 打字练习 https://www.coolcode.info/7447.html 英文打字练习程序 (HTML5 + JavaScript + CSS) 要求: 一、界面美观,适合手机、电脑等设备。 二、打字方式可有覆盖模式、隔行模式两种。 三、有键盘图(真实键盘布局),且对当前的击键有提示。 四、菜单选项分别有(可乱序生成练习内容): 1. asdfg 2. hjklm 3. qwert 4. yuiop 5. zxcvbn 6. 26个英文字母混合 7. 12345 8. 67890 9. +_*/.= 10. 10个数字、+_*/.=混合 11. ;' 12. []\ 13. ,./ 14. 所有符号混合 15. 全键盘所有字母、数字、符号混合乱序 16. 自定义英文文章练习(能打开本地文章练习) 五、设置有 1. 打字时间长度,练习在打字时间内人为可暂停或者结束、时间到了结束三种情况 2. 当击键时,有打字声音(可开启、可关闭) 3. 键盘图、击键提示(可开启、可关闭) 4. 背景图片(可打开本地图片作背景图片) 5. 打字时,可以播放本地歌曲实现打字练习的同时听听音乐(可开启(2055点数解答 | 2025-08-13 20:02:10)155
- [DeepSeek] 从键盘读入一个整数n,输出如下图形 如: n = 3 n=3,输出 123 123 123 123 123 123 如: n = 5 n=5,输出 12345 12345 12345 12345 12345 12345 12345 12345 12345 12345 输入格式 一个正整数 n n。 输出格式 输出 n n 行图形。c++(184点数解答 | 2025-12-06 14:48:06)44
- [字节豆包] 题目描述 从键盘读入一个整数n,输出如下图形 如: n = 3 n=3,输出 123 123 123 123 123 123 如: n = 5 n=5,输出 12345 12345 12345 12345 12345 12345 12345 12345 12345 12345 输入格式 一个正整数 n n。 输出格式 输出 n n 行图形。 用C++简答(222点数解答 | 2026-01-05 20:33:50)25
- [DeepSeek] 题目描述 输入四个整数 x , y , a , b x,y,a,b,请你按照要求输出 x ∼ y x∼y 之间的所有数。 要求: 不要输出数字 a a。 不要输出大于等于数字 b b 的数。 输入格式 输入包括一行,包含四个整数 x , y , a , b x,y,a,b,数字之间用空格隔开。 输出格式 输出包括一行,为 x ∼ y x∼y 之间符合要求的数字。 input1 复制 10 20 13 17 output1 复制 10 11 12 14 15 16 input2 复制 50 55 52 100 output2 复制 50 51 53 54 55 样例解释 对于样例 1 1: 样例要求输出 10 ∼ 20 10∼20 之间不是 13 13, 且小于 17 17 的数,故有 10 , 11 , 12 , 14 , 15 , 16 10,11,12,14,15,16。 数据规模与约定 对于 100 % 100% 的数据, 1 ≤ x ≤ y ≤ 100 1≤x≤y≤100, x ≤ a ≤ y x≤a≤y, x ≤ b x≤b。 C++程序(138点数解答 | 2025-07-19 20:44:46)325
- [GPT] jingyu: { audio: 2, trigger: { global: ["useskill", "logskillbegin", "usecard", "respond"], }, filter(event, player) { if (["global", "equip"].includes(event.type)) return false; let skill = event.sourceskill || event.skill; if (!skill || skill === "jingyu") return false; let info = get.info(skill); while (true) { if (!info || info.charlotte || info.equipskill) return false; if (info && !info.sourceskill) break; skill = info.sourceskill; info = get.info((15点数解答 | 2024-06-06 17:40:23)404
- [讯飞星火] 用java创建窗体jframe综合使用空间容器进行界面的布局,并编程实现在多个不同的界面之间相互跳转。 (1)单击“登录”按钮,能够根据输入的账号密码进行登录;如果登录失败,能够提示;如果登录成功,提示登录成功之后,能到达操作界面。 (2)单击“注册”按钮,登录界面消失,出现注册界面。 (3)单击“退出”按钮,程序退出。 或者,在上面图二中: (1)当单击“添加个人信息”菜单后进入“个人信息添加”界面,添加完成后跳转到个人信息显示界面,如果不想添加可返回到图二。 (2)当单击“修改个人信息”菜单进入到“个人信息修改”界面,修改成功后跳转到个人信息显示界面,如果不想修改可返回到图二。 (3)当单击“查看个人信息”菜单进入到“个人信息显示”界面,查看完毕可返回到图二。 (4)当单击“删除个人信息”菜单进入到“个人信息删除”界面,删除成功后跳转到个人信息显示界面,如果不想修改可返回到图二。(503点数解答 | 2024-06-06 23:49:29)371
- [字节豆包] 题目描述 输入四个整数 x , y , a , b x,y,a,b,请你按照要求输出 x ∼ y x∼y 之间的所有数。 要求: 不要输出数字 a a。 不要输出大于等于数字 b b 的数。 输入格式 输入包括一行,包含四个整数 x , y , a , b x,y,a,b,数字之间用空格隔开。 输出格式 输出包括一行,为 x ∼ y x∼y 之间符合要求的数字。 input1 复制 10 20 13 17 output1 复制 10 11 12 14 15 16 input2 复制 50 55 52 100 output2 复制 50 51 53 54 55 样例解释 对于样例 1 1: 样例要求输出 10 ∼ 20 10∼20 之间不是 13 13, 且小于 17 17 的数,故有 10 , 11 , 12 , 14 , 15 , 16 10,11,12,14,15,16。 数据规模与约定 对于 100 % 100% 的数据, 1 ≤ x ≤ y ≤ 100 1≤x≤y≤100, x ≤ a ≤ y x≤a≤y, x ≤ b x≤b。c++ (304点数解答 | 2025-10-25 20:12:27)72
- [字节豆包] #include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; int n; n = a + b; return 0; }请编写一个程序,输入a和b,并计算n=a+b,输出n的每一位中有多少位是2。 输入: 两个整数a和b。 输出: 一个整数,表示n的每一位中2的个数。 输入样例1: 12345 9876 输出样例1: 4 输入样例2: 11 12 输出样例2: 1 用时/内存: 1000MS/100MB 提示: 【样例说明】 样例1中,12345+9876=22221,22221中有4个2。 样例2中,11+12=23,23中有1个2。 请编写一个程序,输入a和b,并计算n=a+b,输出n的每一位中有多少位是2。 【输入】 两个整数a和b。 【输出】 一个整数,表示n的每一位中2的个数。 【输入样例1】 12345 9876 【输出样例1】 4 【输入样例2】 11 12 【输出样例2】 (331点数解答 | 2025-12-27 20:28:55)25
- [字节豆包] <!doctype html> <html lang="zh"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="css/mian.css"> <link rel="stylesheet" href="css/index.css"> <script src="js/jquery-3.3.1.min.js"></script> <script src="js/jquery-ui.min.js"></script> <script type="text/javascript"> // (1)创建js函数,使用jquery动画,实现ready事件 $(document). ____(1)____ (function(){ //ready事件 $('li').each(function(index){ //遍历对象 $(this).hover(function(){ //单击触发事件 $('li').animate({ width:100 },500); //删除当前元素的样式 $('li').eq(index).animate({ width:200 },500); }); }); }); </script> <title>首页</title> </head> <body> <header> <div class="logo"> <img src="img/logo.jpg" width="250" height="60"> </div> <form class="searchform"> <input type="text" name="search" id="search"/> <input type="submit" value="搜索" id="button"/> </form> <div class="navigation"> <a href="#">手机</a> | <a(475点数解答 | 2024-12-19 14:58:05)340
- [字节豆包] <!doctype html> <html lang="zh"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="css/mian.css"> <link rel="stylesheet" href="css/index.css"> <script src="js/jquery-3.3.1.min.js"></script> <script src="js/jquery-ui.min.js"></script> <script type="text/javascript"> // (1)创建js函数,使用jquery动画,实现ready事件 $(document). ____(1)____ (function(){ //ready事件 $('li').each(function(index){ //遍历对象 $(this).hover(function(){ //单击触发事件 $('li').animate({ width:100 },500); //删除当前元素的样式 $('li').eq(index).animate({ width:200 },500); }); }); }); </script> <title>首页</title> </head> <body> <header> <div class="logo"> <img src="img/logo.jpg" width="250" height="60"> </div> <form class="searchform"> <input type="text" name="search" id="search"/> <input type="submit" value="搜索" id="button"/> </form> <div class="navigation"> <a href="#">手机</a> | <a(495点数解答 | 2024-12-19 14:58:06)291
- [讯飞星火] <!doctype html> <html lang="zh"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="css/mian.css"> <link rel="stylesheet" href="css/index.css"> <script src="js/jquery-3.3.1.min.js"></script> <script src="js/jquery-ui.min.js"></script> <script type="text/javascript"> // (1)创建js函数,使用jquery动画,实现ready事件 $(document). ____(1)____ (function(){ //ready事件 $('li').each(function(index){ //遍历对象 $(this).hover(function(){ //单击触发事件 $('li').animate({ width:100 },500); //删除当前元素的样式 $('li').eq(index).animate({ width:200 },500); }); }); }); </script> <title>首页</title> </head> <body> <header> <div class="logo"> <img src="img/logo.jpg" width="250" height="60"> </div> <form class="searchform"> <input type="text" name="search" id="search"/> <input type="submit" value="搜索" id="button"/> </form> <div class="navigation"> <a href="#">手机</a> | <a(497点数解答 | 2024-12-19 14:58:18)296
- [讯飞星火] <!doctype html> <html lang="zh"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="css/mian.css"> <link rel="stylesheet" href="css/index.css"> <script src="js/jquery-3.3.1.min.js"></script> <script src="js/jquery-ui.min.js"></script> <script type="text/javascript"> // (1)创建js函数,使用jquery动画,实现ready事件 $(document). ____(1)____ (function(){ //ready事件 $('li').each(function(index){ //遍历对象 $(this).hover(function(){ //单击触发事件 $('li').animate({ width:100 },500); //删除当前元素的样式 $('li').eq(index).animate({ width:200 },500); }); }); }); </script> <title>首页</title> </head> <body> <header> <div class="logo"> <img src="img/logo.jpg" width="250" height="60"> </div> <form class="searchform"> <input type="text" name="search" id="search"/> <input type="submit" value="搜索" id="button"/> </form> <div class="navigation"> <a href="#">手机</a> | <a(497点数解答 | 2024-12-19 14:58:20)311