{"id":14938,"student_id":10,"content":"{\"html\":\"\u003ctable\u003e\\n \u003ctr\u003e\\n \\t\u003ctd id=\\\"a\\\" onclick=\\\"play(this, 0)\\\"\u003e\u003c/td\u003e\\n \\t\u003ctd id=\\\"b\\\" onclick=\\\"play(this, 1)\\\"\u003e\u003c/td\u003e\\n \\t\u003ctd id=\\\"c\\\" onclick=\\\"play(this, 2)\\\"\u003e\u003c/td\u003e\\n \u003c/tr\u003e\\n \u003ctr\u003e\\n \\t\u003ctd id=\\\"d\\\" onclick=\\\"play(this, 3)\\\"\u003e\u003c/td\u003e\\n \\t\u003ctd id=\\\"e\\\" onclick=\\\"play(this, 4)\\\"\u003e\u003c/td\u003e\\n \\t\u003ctd id=\\\"f\\\" onclick=\\\"play(this, 5)\\\"\u003e\u003c/td\u003e\\n \u003c/tr\u003e\\n \u003ctr\u003e\\n \\t\u003ctd id=\\\"g\\\" onclick=\\\"play(this, 6)\\\"\u003e\u003c/td\u003e\\n \\t\u003ctd id=\\\"h\\\" onclick=\\\"play(this, 7)\\\"\u003e\u003c/td\u003e\\n \\t\u003ctd id=\\\"i\\\" onclick=\\\"play(this, 8)\\\"\u003e\u003c/td\u003e\\n \u003c/tr\u003e\\n\u003c/table\u003e\",\"css\":\"table {\\n position: fixed;\\n top: 50%;\\n left: 50%;\\n transform: translate(-50%, -50%);\\n}\\n\\ntd {\\n width: 100px;\\n height: 100px;\\n border: 1px solid #ccc; \\n text-align: center;\\n font-size: 50px;\\n font-weight: 900;\\n}\\n\\n.X {\\n background-color: lightseagreen;\\n color: #fff;\\n}\\n\\n.O {\\n background-color: orangered;\\n color: #fff;\\n}\",\"js\":\"var grid = [0,1,2,3,4,5,6,7,8];\\n\\nvar current = true;\\n\\nfunction play (element, index) {\\n if (element.innerHTML == '') {\\n var t = current ? 'O' : 'X'\\n element.innerHTML = t;\\n element.classList.add(t);\\n grid[index] = t;\\n current = !current;\\n check();\\n } \\n}\\n\\nwindow.play = play;\\n\\nfunction check () {\\n if (grid[0] == grid[1] \u0026\u0026 grid[1] == grid[2]) {\\n alert('獲勝者:' + grid[1]);\\n }\\n if (grid[3] == grid[4] \u0026\u0026 grid[4] == grid[5]) {\\n alert('獲勝者:' + grid[3]);\\n }\\n if (grid[6] == grid[7] \u0026\u0026 grid[7] == grid[8]) {\\n alert('獲勝者:' + grid[6]);\\n }\\n if (grid[0] == grid[3] \u0026\u0026 grid[3] == grid[6]) {\\n alert('獲勝者:' + grid[0]);\\n }\\n if (grid[1] == grid[4] \u0026\u0026 grid[4] == grid[7]) {\\n alert('獲勝者:' + grid[1]);\\n }\\n if (grid[2] == grid[5] \u0026\u0026 grid[5] == grid[8]) {\\n alert('獲勝者:' + grid[2]);\\n }\\n if (grid[0] == grid[4] \u0026\u0026 grid[4] == grid[8]) {\\n alert('獲勝者:' + grid[0]);\\n }\\n if (grid[2] == grid[4] \u0026\u0026 grid[4] == grid[6]) {\\n alert('獲勝者:' + grid[2]);\\n }\\n};\\n\\n\"}","created_at":"2017-11-06T22:44:18.954+08:00","updated_at":"2019-11-08T16:21:06.982+08:00","name":"OOXX","language":"web","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/14938/0c9cf1e49075b8b1b4e50e5f0cbc38bd.jpg"},"parent_id":null,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":603,"hashid":"4y3sgenw","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
前往網站頁面
1:1:1
1:1
full
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦