{"id":574457,"student_id":10,"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 background-color: white;\\n border-radius: 5px;\\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":"2023-07-24T09:38:28.396+08:00","updated_at":"2023-07-24T09:38:28.396+08:00","name":"【綜合練習】算術炸彈:實作 2 - 問題 副本","language":"web","screenshot":{"url":null},"parent_id":574429,"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":[],"is_featured":false,"views":358,"hashid":"4y3szjdqz","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":13034804,"file_name":"koding.png","project_id":574457,"asset_id":661676,"created_at":"2023-07-24T09:38:28.402+08:00","updated_at":"2023-07-24T09:38:28.402+08:00"}]
Orange Apple Learning Platform
My Projects
View Project Page
Export
Remix
Import
Delete
Download Android APP (APK)
Screenshot
Open Web Site
繁中
简中
English
日本語
1:1:1
1:1
Full Width
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer