{"id":218559,"student_id":2589,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n\\t\u003ctitle\u003eDocument\u003c/title\u003e\\n\\t\u003cscript\\n src=\\\"https://code.jquery.com/jquery-3.3.1.min.js\\\"\u003e\u003c/script\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n \u003ch3 class=\\\"best\\\"\u003e最佳紀錄:\u003c/h3\u003e\\n \u003cdiv class=\\\"box\\\"\u003e\\n \u003ch1\u003e點擊開始\u003c/h1\u003e\\n \u003ch2\u003e當顏色從「紅色」轉變為「綠色」時點擊頁面!\u003c/h2\u003e\\n \u003c/div\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\",\"css\":\"body {\\n width: 100vw;\\n height: 100vw;\\n color: #fff;\\n background-color: royalblue;\\n cursor: pointer;\\n}\\n\\nh1 {\\n font-size: 60px;\\n}\\n\\nh2 {\\n font-size: 20px;\\n}\\n\\nh3 {\\n margin: 15px;\\n}\\n\\n.box {\\n position: fixed;\\n top: 50%;\\n left: 50%;\\n transform: translate(-50%, -50%);\\n text-align: center;\\n}\",\"js\":\"\"}","created_at":"2021-01-13T15:43:13.941+08:00","updated_at":"2022-11-05T13:35:11.602+08:00","name":"反應大考驗(試玩版)","language":"web","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/218559/bf169691d49aa242e5dc2349b57e6f58.jpg"},"parent_id":3,"plugin":"var status = 'blue';\nvar startTime;\nvar id;\nvar best = Infinity;\n\n$('body').on('click', function () {\n if (status === 'blue') start();\n else if (status === 'red') tooSoon();\n else if (status === 'green') showResult();\n});\n\nfunction start () {\n $('h1').text('等待綠色');\n $('h2').text('');\n $('body').css('backgroundColor', 'red');\n status = 'red';\n \n var time = Math.random()*10000;\n id = setTimeout(showClick, time);\n};\n\nfunction showClick () {\n $('h1').text('點擊!');\n $('body').css('backgroundColor', 'springgreen');\n status = 'green'; \n \n startTime = Date.now();\n}\n\nfunction tooSoon () {\n $('h1').text('太快了');\n $('h2').text('點擊再試一次!');\n $('body').css('backgroundColor', 'royalblue');\n status = 'blue';\n \n clearTimeout(id);\n}\n\nfunction showResult () {\n var time = Date.now() - startTime;\n $('h1').text(time + 'ms');\n $('h2').text('點擊再試一次');\n $('body').css('backgroundColor', 'royalblue');\n status = 'blue';\n \n if (time \u003c best) {\n best = time;\n $('h3').text('最佳紀錄:' + time + 'ms');\n }\n}\n","description":null,"note":null,"status":"public","like_student_ids":[5135,6712,17308,10771,13106,16412,12542,12108,11806,17411],"is_featured":false,"views":1317,"hashid":"d5msvyzzz","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3863173,"file_name":"koding.png","project_id":218559,"asset_id":304963,"created_at":"2021-01-13T15:43:27.076+08:00","updated_at":"2021-01-13T15:43:27.076+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
前往網站頁面
1:1:1
1:1
full
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦