{"id":185011,"student_id":3469,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\r\\n\u003chtml\u003e\\r\\n\u003chead\u003e\\r\\n \u003ctitle\u003eDocument\u003c/title\u003e\\r\\n \u003cscript src=\\\"https://code.jquery.com/jquery-3.4.1.min.js\\\"\u003e\u003c/script\u003e\\r\\n\u003c/head\u003e\\r\\n\u003cbody\u003e\\r\\n \u003ch1 style=\\\"text-align: center;\\\"\u003e翻開0次\u003c/h1\u003e\\r\\n\\r\\n \u003cdiv class=\\\"container\\\"\u003e\\r\\n \u003cbutton data-index=\\\"0\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"1\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"2\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"3\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"4\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"5\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"6\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"7\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"8\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"9\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"10\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"11\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"12\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"13\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"14\\\"\u003e❓\u003c/button\u003e\\r\\n \u003cbutton data-index=\\\"15\\\"\u003e❓\u003c/button\u003e\\r\\n \u003c/div\u003e\\r\\n\\r\\n\u003c/body\u003e\\r\\n\u003c/html\u003e\",\"css\":\"body {\\r\\n width: 100 vw;\\r\\n height: 100 vh;\\r\\n}\\r\\n\\r\\n.container {\\r\\n width: 280px;\\r\\n height: 280px;\\r\\n position: absolute;\\r\\n top: 50%;\\r\\n left: 50%;\\r\\n transform: translate(-50%, -50%);\\r\\n}\\r\\n\\r\\nbutton {\\r\\n width: 70px;\\r\\n height: 70px;\\r\\n display: inline-block;\\r\\n line-height: 50px;\\r\\n font-size: 3rem;\\r\\n float: left;\\r\\n}\",\"js\":\"// 選擇相對emoji放入陣列\\nvar answers = [\\n '⚡', '⚔️', '🏹', '🔫', '💎', '🧬', '☄️', '🌀',\\n '⚡', '⚔️', '🏹', '🔫', '💎', '🧬', '☄️', '🌀'\\n];\\nvar first;\\nvar second;\\n\\n\\nvar firstEl;\\nvar secondEl;\\n\\nvar firstClick;\\nvar secondClick;\\n\\nvar lock = false;\\n\\nvar count = 0;\\n\\n\\n\\n\\nfor (var i = 0; i \u003c 30; i++) {\\n var rand1 = Math.floor(Math.random() * 16);\\n var rand2 = Math.floor(Math.random() * 16);\\n var tmp = answers[rand1];\\n answers[rand1] = answers[rand2];\\n answers[rand2] = tmp;\\n}\\n\\n\\n\\n\\n$('button').click(function () {\\n if (lock === false) {\\n if (first === undefined) {\\n first = answers[$(this).data('index')];\\n firstClick = $(this).data('index');\\n $(this).text(first);\\n firstEl = $(this);\\n counting();\\n } else if (second === undefined) {\\n secondClick = $(this).data('index');\\n\\n if (firstClick != secondClick) {\\n second = answers[$(this).data('index')];\\n $(this).text(second);\\n secondEl = $(this);\\n if (first != second) {\\n lock = true;\\n setTimeout(function() {\\n firstEl.text('❓');\\n secondEl.text('❓');\\n lock = false;\\n }, 1000);\\n }\\n first = undefined;\\n second = undefined;\\n counting();\\n }\\n\\n\\n\\n }\\n\\n }\\n\\n\\n});\\n\\n\\n\\nfunction counting () {\\n count++;\\n $('h1').text('翻開' + count + '次');\\n}\"}","created_at":"2020-08-23T13:36:48.297+08:00","updated_at":"2020-11-28T14:15:20.979+08:00","name":"Emoji 配對大作戰 副本","language":"web","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/185011/9947e3ef62ca5a7db3714ce7b7d59eab.jpg"},"parent_id":93544,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":84,"hashid":"ej9snjr2","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3149348,"file_name":"koding.png","project_id":185011,"asset_id":107444,"created_at":"2020-08-23T13:36:48.304+08:00","updated_at":"2020-08-23T13:36:48.304+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
前往網站頁面
1:1:1
1:1
full
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦