{"id":218558,"student_id":2589,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n \u003ctitle\u003eDocument\u003c/title\u003e\\n \u003cscript src=\\\"https://code.jquery.com/jquery-3.3.1.min.js\\\"\u003e\u003c/script\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n \u003cdiv id=\\\"bar\\\"\u003e\u003c/div\u003e\\n \u003ch2 class=\\\"level js-level\\\"\u003e Level: ? \u003c/h2\u003e\\n \u003ch1 class=\\\"js-formula\\\"\u003e? + ? = ?\u003c/h1\u003e\\n \u003cbutton class=\\\"btn-yes js-yes\\\"\u003eO\u003c/button\u003e\\n \u003cbutton class=\\\"btn-no js-no\\\"\u003eX\u003c/button\u003e\\n \u003ch2 class=\\\"gameover js-gameover\\\"\u003eGameOver\u003c/h2\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\",\"css\":\"body {\\n text-align: center;\\n color: #555555;\\n font-family: Arial;\\n}\\n\\nh1 {\\n font-size: 4rem;\\n}\\n\\n.gameover {\\n color: #ec6d67;\\n display: none;\\n}\\n\\n#bar {\\n width: 100%;\\n height: 10px;\\n background-color: #f1c40f;\\n margin-bottom: 60px;\\n}\\n\\nbutton {\\n padding: .5rem 1.5rem;\\n font-size: 2rem;\\n font-weight: bold;\\n outline: none;\\n cursor: pointer;\\n}\\n\\n.btn-yes {\\n color: #2cbeff;\\n border: 3px solid #2cbeff;\\n}\\n\\n.btn-yes:hover {\\n color: #fff;\\n background-color: #2cbeff;\\n}\\n\\n.btn-no {\\n color: #ec6d67;\\n border: 3px solid #ec6d67;\\n}\\n\\n.btn-no:hover {\\n color: #fff;\\n background-color: #ec6d67;\\n}\",\"js\":\"\"}","created_at":"2021-01-13T15:35:04.146+08:00","updated_at":"2022-10-22T14:50:26.371+08:00","name":"算數炸彈","language":"web","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/218558/224c3d09f625b51500c6f0f0da66a6c0.jpg"},"parent_id":3,"plugin":"var timer = 0;\nvar level = 0;\nvar correct;\n\nfunction start () {\n var a = Math.floor(Math.random()*10);\n var b = Math.floor(Math.random()*10);\n var answer = a + b;\n \n correct = Math.random() \u003e 0.5;\n if (!correct) answer += 1 + Math.floor(Math.random()*5);\n \n timer = 0;\n level++;\n $('.js-level').text('level:' + level);\n $('.js-formula').text(`${a} + ${b} = ${answer}`);\n}\n\nfunction gameOver () {\n timer = 100;\n $('.js-gameover').show();\n $('button').hide();\n}\n\nstart();\n\n$('.js-yes').click(function () {\n if (correct) start();\n else gameOver();\n});\n\n$('.js-no').click(function () {\n if (!correct) start();\n else gameOver();\n});\n\n\nsetInterval(function () {\n timer += 0.1 + 0.01*level;\n $('#bar').css('width', timer + '%')\n if (timer \u003e 100) gameOver();\n});","description":null,"note":null,"status":"public","like_student_ids":[5135,11396,7418,10522,9397,26779,9429,7403,16868,12460,10730,9254,17411,12432],"is_featured":false,"views":1451,"hashid":"qmds83ppm","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3863171,"file_name":"koding.png","project_id":218558,"asset_id":304962,"created_at":"2021-01-13T15:35:18.528+08:00","updated_at":"2021-01-13T15:35:18.528+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
前往網站頁面
1:1:1
1:1
full
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦