HTML實現每天單詞積累

注冊頁面

<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><title>注冊</title><style>body {font-family: Arial, sans-serif;background-color: #f5f5f5;}form {max-width: 500px;margin: 50px auto;padding: 40px;background-color: #fff;box-shadow: 0 2px 4px rgba(0,0,0,0.2);border-radius: 6px;}h1 {font-size: 36px;text-align: center;margin-top: 0;color: #2c3e50;text-shadow: 1px 1px 0 #fff;}label {display: block;margin-bottom: 10px;color: #2c3e50;text-shadow: 1px 1px 0 #fff;font-size: 18px;}input {padding: 10px;width: 100%;border: 1px solid #ccc;border-radius: 4px;margin-bottom: 20px;box-sizing: border-box;font-size: 16px;color: #2c3e50;}input:focus {outline: none;border-color: #51a6ff;}input[type="checkbox"] {width: auto;margin-top: 10px;margin-right: 5px;}button[type="submit"] {padding: 12px 24px;background-color: #51a6ff;color: #fff;border: none;border-radius: 4px;cursor: pointer;transition: all 0.3s ease;font-size: 20px;}button[type="submit"]:hover {background-color: #0072c6;}.error {color: #ff4d4d;font-size: 14px;margin-top: 5px;}</style>
</head>
<body><form><h1>注冊</h1><label>用戶名:</label><input type="text" name="username" required><label>密碼:</label><input type="password" name="password" required><label>確認密碼:</label><input type="password" name="confirm_password" required><center><label><input type="checkbox" name="agree" required>我已同意<a href="#">注冊協議</a></label></center><p style="text-align: right;"><button type="submit">注冊</button></p></form>
</body>
</html>

背單詞頁面

<!DOCTYPE html>
<html><head><meta charset="UTF-8"><title>背單詞軟件</title><style>body {font-family: Arial, sans-serif;background-color: #f0f0f0;}.container {max-width: 800px;margin: 0 auto;padding: 20px;background-color: #fff;box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);}h1 {text-align: center;color: #333;}.word {font-size: 36px;color: #333;text-align: center;margin: 40px 0;}.definition {font-size: 24px;color: #666;text-align: center;margin-bottom: 40px;}.button {display: block;margin: 0 auto;padding: 10px 30px;border-radius: 5px;background-color: #333;color: #fff;font-size: 18px;text-align: center;cursor: pointer;}.button:hover {background-color: #555;}</style></head><body><div class="container"><h1>背單詞軟件</h1><div class="word">apple</div><div class="definition">n. 蘋果</div><button class="button" onclick="showNext()">下一個</button></div><script>// 單詞和定義列表var words = [{ word: 'apple', definition: 'n. 蘋果' },{ word: 'banana', definition: 'n. 香蕉' },{ word: 'orange', definition: 'n. 橘子' },{ word: 'grape', definition: 'n. 葡萄' },{ word: 'watermelon', definition: 'n. 西瓜' }];// 當前顯示的單詞索引var currentWordIndex = 0;// 顯示下一個單詞和定義function showNext() {currentWordIndex++;if (currentWordIndex >= words.length) {currentWordIndex = 0;}document.querySelector('.word').textContent = words[currentWordIndex].word;document.querySelector('.definition').textContent = words[currentWordIndex].definition;}</script></body>
</html>

作答題目

單詞填空

<!DOCTYPE html>
<html><head><meta charset="UTF-8"><title>填詞游戲</title><style>body {font-family: Arial, sans-serif;background-color: #f0f0f0;}.container {max-width: 800px;margin: 0 auto;padding: 20px;background-color: #fff;box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);}h1 {text-align: center;color: #333;}.word {font-size: 36px;color: #333;text-align: center;margin: 40px 0;}.letter {display: inline-block;width: 30px;height: 30px;margin: 0 20px;font-size: 36px;line-height: 50px;text-align: center;border-radius: 5px;background-color: #fff;border: 2px solid #666;outline: none;cursor: text;}.letter:focus {border-color: #333;}.button {display: block;margin: 0 auto;padding: 10px 30px;border-radius: 5px;background-color: #333;color: #fff;font-size: 18px;text-align: center;cursor: pointer;}.button:hover {background-color: #555;}</style></head><body><div class="container"><h1>填寫出正確的字母。</h1><div class="word">app<input type="text" class="letter" maxlength="1" autofocus><input type="text" class="letter" maxlength="1"></div><button class="button" onclick="checkAnswer()">提交</button></div><script>// 正確答案var correctAnswer = 'le';// 檢查玩家輸入的答案function checkAnswer() {var inputLetters = document.querySelectorAll('.letter');var playerAnswer = '';for (var i = 0; i < inputLetters.length; i++) {playerAnswer += inputLetters[i].value;}if (playerAnswer === correctAnswer) {alert('答對了!');} else {alert('答錯了,請再試一次。');}}</script></body>
</html>

單詞含義

<!DOCTYPE html>
<html><head><meta charset="UTF-8"><title>選單詞釋義游戲</title><style>body {font-family: Arial, sans-serif;background-color: #f0f0f0;}.container {max-width: 800px;margin: 0 auto;padding: 20px;background-color: #fff;box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);}h1 {text-align: center;color: #333;}.word {font-size: 36px;color: #333;text-align: center;margin: 40px 0;}.options {margin: 40px 0;}.option {display: block;margin: 10px 0;padding: 10px 30px;border-radius: 5px;background-color: #fff;box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);color: #333;font-size: 24px;text-align: center;cursor: pointer;}.option:hover {background-color: #f0f0f0;}.button {display: block;margin: 0 auto;padding: 10px 30px;border-radius: 5px;background-color: #333;color: #fff;font-size: 18px;text-align: center;cursor: pointer;}.button:hover {background-color: #555;}</style></head><body><div class="container"><h1>選擇單詞的正確釋義。</h1><div class="word">sophisticated</div><div class="options"><div class="option" data-answer="1">有學問的</div><div class="option" data-answer="0">簡單的</div><div class="option" data-answer="0">笨拙的</div><div class="option" data-answer="0">愚蠢的</div></div><button class="button" onclick="checkAnswer()">提交</button></div><script>// 正確答案var correctAnswer = 1;// 檢查玩家選擇的答案function checkAnswer() {var options = document.querySelectorAll('.option');var playerAnswer = -1;for (var i = 0; i < options.length; i++) {if (options[i].classList.contains('selected')) {playerAnswer = parseInt(options[i].getAttribute('data-answer'));}options[i].classList.remove('selected');}if (playerAnswer === correctAnswer) {alert('答對了!');} else {alert('答錯了,請再試一次。');}}// 為選項添加事件監聽器var options = document.querySelectorAll('.option');for (var i = 0; i < options.length; i++) {options[i].addEventListener('click', function() {for (var j = 0; j < options.length; j++) {options[j].classList.remove('selected');}this.classList.add('selected');});}</script></body>
</html>

釋義選擇

<!DOCTYPE html>
<html><head><meta charset="UTF-8"><title>選單詞游戲</title><style>body {font-family: Arial, sans-serif;background-color: #f0f0f0;}.container {max-width: 800px;margin: 0 auto;padding: 20px;background-color: #fff;box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);}h1 {text-align: center;color: #333;}.word {font-size: 36px;color: #333;text-align: center;margin: 40px 0;}.options {margin: 40px 0;}.option {display: block;margin: 10px 0;padding: 10px 30px;border-radius: 5px;background-color: #fff;box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);color: #333;font-size: 24px;text-align: center;cursor: pointer;}.option:hover {background-color: #f0f0f0;}.button {display: block;margin: 0 auto;padding: 10px 30px;border-radius: 5px;background-color: #333;color: #fff;font-size: 18px;text-align: center;cursor: pointer;}.button:hover {background-color: #555;}</style></head><body><div class="container"><h1>選出正確的單詞。</h1><div class="word">蘋果</div><div class="options"><div class="option" data-answer="0">banana</div><div class="option" data-answer="0">pear</div><div class="option" data-answer="1">apple</div><div class="option" data-answer="0">orange</div></div><button class="button" onclick="checkAnswer()">提交</button></div><script>// 正確答案var correctAnswer = 1;// 檢查玩家選擇的答案function checkAnswer() {var options = document.querySelectorAll('.option');var playerAnswer = -1;for (var i = 0; i < options.length; i++) {if (options[i].classList.contains('selected')) {playerAnswer = parseInt(options[i].getAttribute('data-answer'));}options[i].classList.remove('selected');}if (playerAnswer === correctAnswer) {alert('答對了!');} else {alert('答錯了,請再試一次。');}}// 為選項添加事件監聽器var options = document.querySelectorAll('.option');for (var i = 0; i < options.length; i++) {options[i].addEventListener('click', function() {for (var j = 0; j < options.length; j++) {options[j].classList.remove('selected');}this.classList.add('selected');});}</script></body>
</html>

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/208513.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/208513.shtml
英文地址,請注明出處:http://en.pswp.cn/news/208513.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

【Docker】進階之路:(九)Docker網絡

【Docker】從零開始&#xff1a;19.Docker網絡 Docker網絡模式簡介bridge網絡模式host網絡模式none網絡模式container網絡模式user-defined網絡模式1.創建自定義的bridge網絡2.使用自定義網絡 高級網絡配置docker network命令 為什么要了解容器的網絡模式? 首先&#xff0c;容…

spark 寫入 mysql 報錯

報錯信息如下&#xff1a; "C:\Program Files\Java\jdk1.8.0_291\bin\java.exe" "-javaagent:D:\Hadoopruanjian\IDEA\IntelliJ IDEA 2021.3.2\lib\idea_rt.jar60971:D:\Hadoopruanjian\IDEA\IntelliJ IDEA 2021.3.2\bin" -Dfile.encodingUTF-8 -classpat…

工業級路由器在風力發電場的遠程監控技術

工業級路由器在風力發電場的遠程監控技術方面具有重要的應用意義。風力發電場通常由分布在廣闊地區的風力發電機組組成&#xff0c;需要進行實時監測、數據采集和遠程管理。工業級路由器作為網絡通信設備&#xff0c;能夠提供穩定可靠的網絡連接和多種遠程管理功能&#xff0c;…

深入探討Go語言協程調度:GRM模型解析與優化策略

一、線程調度 1、早期單線程操作系統 一切的軟件都是跑在操作系統上&#xff0c;真正用來干活&#xff08;計算&#xff09;的是 CPU早期的操作系統每個程序就是一個進程&#xff0c;直到一個程序運行完&#xff0c;才能進行下一個進程&#xff0c;就是“單進程時代”一切的程…

ES6中新增的基本數據類型----symbol

前言 Symbol 基本數據類型 獨一無二得值 Symbol函數創建 接收字符串 對symbol值得描述 let s1 Symbol(描述) /*** symbol 基本數據類型 表示獨一無二的值 Symbol函數創建獨一無二得值 參數可以是唯一值得描述*/ let sy1 Symbol();//創建好一個獨一無二得值 let sy2 Symbo…

EXP-00056: 遇到 ORACLE 錯誤 12154 ORA-12154: TNS: 無法解析指定的連接標識符

exp oas/oasoas filed:\daochu.dmp owner(s) 導出特定用戶 //exp 用戶名/密碼數據庫 filed:\daochu.dmp owner(用戶名) 1.重啟oracle監聽 cmd 中輸入 services.msc 找到服務&#xff1a;OracleOraDb10g_home1TNSListener 與 OracleServiceORCL。 把兩個服務啟動. 若未解決…

Vue 3 + Tailwind CSS:打造現代化項目的完美組合

Vue 3 Tailwind CSS&#xff1a;打造現代化項目的完美組合 本篇教程將向你介紹如何將 Tailwind CSS 與 Vue 3 項目搭配使用&#xff0c;為你的項目提供現代化的 UI 呈現和開發體驗。通過本文的逐步演示和示例代碼&#xff0c;你將很快掌握在 Vue 3 中集成和使用 Tailwind CSS…

SCI一區級 | Matlab實現GWO-CNN-BiLSTM-selfAttention多變量多步時間序列預測

SCI一區級 | Matlab實現GWO-CNN-BiLSTM-selfAttention多變量多步時間序列預測 目錄 SCI一區級 | Matlab實現GWO-CNN-BiLSTM-selfAttention多變量多步時間序列預測預測效果基本介紹程序設計參考資料 預測效果 基本介紹 1.Matlab實現GWO-CNN-BiLSTM-selfAttention灰狼算法優化卷…

IntelliJ idea卡頓解決,我遇到的比較管用的方案

Setttings> Build, Execution,Deployment>Debugger> Data Views> Java 取消 Enable "toString()" object view; Speed up debugging in IntelliJ Yesterday, I observed painfully slow debugging in IntelliJ. Every step over or step in took almost…

【力扣】234.回文鏈表2

234.回文鏈表2 感覺自己還是有點時間&#xff0c;然后又學了兩種解法。那就一起整理一下。 法一&#xff1a;反轉鏈表后比較 題解看我的這一篇就行&#xff08;click) 法二&#xff1a;數組雙指針 思路很簡單&#xff0c;就是用while循環遍歷一下整個鏈表將對應的值復制到…

2023年12月8日:UI登陸界面

作業 頭文件 #ifndef WIDGET_H #define WIDGET_H#include <QWidget> #include <QMovie> #include <QPushButton> #include <QDebug>QT_BEGIN_NAMESPACE namespace Ui { class Widget; } QT_END_NAMESPACEclass Widget : public QWidget {Q_OBJECTpub…

GO語言開始

GO語言開始 下載windows版本安裝后查看 是否安裝成功下載GO的集成開發工具第一個GO程序 Go官網地址&#xff1a;https://golang.org/ Go 官方鏡像站&#xff08;推薦&#xff09;:https://golang.google.cn/dl/ 下載windows版本 安裝后查看 是否安裝成功 下載GO的集成開發工具…

鴻蒙原生應用開發【分布式數據對象】

01、什么是分布式數據對象 在可信組網環境下&#xff0c;多個相互組網認證的設備將各自創建的對象加入同一個 sessionId&#xff0c;使得加入的多個數據對象之間可以同步數據&#xff0c;也就是說&#xff0c;當某一數據對象屬性發生變更時&#xff0c;其他數據對象會檢測到這…

前端知識筆記(三十七)———Django與Ajax

特點&#xff1a; 異步提交 局部刷新 例子&#xff1a;github注冊 動態獲取用戶名實時的跟后端確認并實時的展示到前端&#xff08;局部刷新&#xff09; 朝后端發送請求的方式 1.瀏覽器地址欄直接輸入url回車 -----》get請求 2.a標簽的href屬性 -----》get請求 3…

pcl-3 pcl結合opencv做svm分類(法向量特征數據)

后續使用了fpfh特征作為訓練數據&#xff0c;遇到了一些困難 首先是flann沖突&#xff0c;這個將opcv中的flann都改成了flann2就可以運行 后面在將得到的33特征值進行訓練的時候一直內存超限&#xff0c;傳輸的不太好&#xff0c;到現在還是不行&#xff0c;改了三天還是沒有改…

Flink 系列文章匯總索引

Flink 系列文章 一、Flink 專欄 本專欄系統介紹某一知識點&#xff0c;并輔以具體的示例進行說明。 本專欄的文章編號可能不是順序的&#xff0c;主要是因為寫的時候順序沒統一&#xff0c;但相關的文章又引入了&#xff0c;所以后面就沒有調整了&#xff0c;按照寫文章的順…

OpenCL學習筆記(三)手動編譯開發庫(win10+mingw64)

前言 有的小伙伴仍然在使用mingw編譯器&#xff0c;這時只能重新編譯opencl的sdk庫。本文檔簡單記錄下win10下&#xff0c;使用mingw11.20編譯的過程&#xff0c;有需要的小伙伴可以參考下 一、安裝所需軟件 1.安裝git&#xff0c;教程比較多&#xff0c;不再重復 2.安裝cm…

chrome安裝jsonview

寫在前面 通過jsonview可以實現&#xff0c;當http響應時application/json時直接在瀏覽器格式化顯示&#xff0c;增加可讀性。本文看下如何安裝該插件到chrome中。 1&#xff1a;安裝 首先在這里 下載插件包&#xff0c;然后解壓備用。接著在chrome按照如下步驟操作&#xf…

千鋒 Vue 詳細筆記整理

視頻筆記是根據B站 千鋒 濤哥 - SpringBootvue前后端分離項目《鋒迷商城》實戰課-完結版 進行整理的 筆記可上 gitee倉庫 自取 千鋒 Vue 筆記整理 一、vue 的簡介1.1 使用 JQuery 的復雜性問題1.2 VUE 簡介1.2.1 前端框架1.2.2 MVVM 二、 vue 入門使用2.1 vue 的引入2.2 入門案…

WPF(Windows Presentation Foundation)的 StatusBar控件

WPF&#xff08;Windows Presentation Foundation&#xff09;的 StatusBar 是一種用于顯示狀態欄的控件。狀態欄是用于向用戶提供應用程序的狀態信息或其他相關信息的區域。它通常位于應用程序窗口的底部&#xff0c;并提供一些常見的功能&#xff0c;如顯示進度、狀態文本、通…