{"id":54562,"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}\\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\":\"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.005*level;\\n $('#bar').css('width', timer + '%')\\n if (timer \u003e 100) gameOver();\\n});\"}","created_at":"2019-01-22T10:40:10.730+08:00","updated_at":"2019-11-08T00:38:50.263+08:00","name":"算數炸彈","language":"web","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/54562/2ff4ddbb27873a3cc50daedb93a115f0.jpg"},"parent_id":3,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":316,"hashid":"rdvs39kd","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":973185,"file_name":"koding.png","project_id":54562,"asset_id":107444,"created_at":"2019-01-22T10:40:10.757+08:00","updated_at":"2019-01-22T10:40:10.757+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
前往網站頁面
1:1:1
1:1
full
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦