{"id":54434,"student_id":10,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n\\t\u003ctitle\u003eDocument\u003c/title\u003e\\n \u003cscript src=\\\"https://code.jquery.com/jquery-3.2.1.slim.min.js\\\"\u003e\u003c/script\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n \u003ch1\u003eTic Tac Toe\u003c/h1\u003e\\n \u003cdiv class=\\\"grid\\\"\u003e\\n \u003cdiv id=\\\"a\\\"\u003e\u003c/div\u003e\\n \u003cdiv id=\\\"b\\\"\u003e\u003c/div\u003e\\n \u003cdiv id=\\\"c\\\"\u003e\u003c/div\u003e\\n \u003cdiv id=\\\"d\\\"\u003e\u003c/div\u003e\\n \u003cdiv id=\\\"e\\\"\u003e\u003c/div\u003e\\n \u003cdiv id=\\\"f\\\"\u003e\u003c/div\u003e\\n \u003cdiv id=\\\"g\\\"\u003e\u003c/div\u003e\\n \u003cdiv id=\\\"h\\\"\u003e\u003c/div\u003e\\n \u003cdiv id=\\\"i\\\"\u003e\u003c/div\u003e\\n \u003c/div\u003e\\n \u003cbutton\u003e再來一局 \u003e\u003c/button\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\",\"css\":\"body {\\n color: #dc685a;\\n text-align: center;\\n}\\n\\nbutton {\\n margin: 30px;\\n padding: .5rem 1rem;\\n font-size: 1rem;\\n color: #ecaf4f;\\n border: 2px solid #ecaf4f;\\n font-weight: bold;\\n}\\n\\n.grid {\\n width: 330px;\\n height: 330px;\\n margin: auto;\\n}\\n\\n.grid div {\\n width: 100px;\\n height: 100px;\\n margin: 5px;\\n border-radius: 10px;\\n float: left;\\n line-height: 100px;\\n font-size: 4rem;\\n font-weight: bold;\\n color: #fff;\\n background-color: #78bec5;\\n text-shadow: 0px 0px 10px #999;\\n box-shadow: 0px 0px 10px #999;\\n cursor: pointer;\\n}\",\"js\":\"var current = 'O';\\n$('.grid div').click(function () {\\n if ($(this).text() == '') {\\n $(this).text(current);\\n if (current == 'O') {\\n current = 'X';\\n $(this).css('background-color', '#ecaf4f');\\n } else {\\n current = 'O';\\n $(this).css('background-color', '#dc685a');\\n }\\n }\\n\\n var a = $('#a').text();\\n var b = $('#b').text();\\n var c = $('#c').text();\\n var d = $('#d').text();\\n var e = $('#e').text();\\n var f = $('#f').text();\\n var g = $('#g').text();\\n var h = $('#h').text();\\n var i = $('#i').text();\\n // if a == b and b == c: print(a 獲勝)\\n check(d, e, f);\\n check(g, h, i);\\n check(a, d, g);\\n check(b, e, h);\\n check(c, f, i);\\n check(a, e, i);\\n check(c, e, g);\\n});\\n\\nfunction check(x, y, z) {\\n if (x == y \u0026\u0026 y == z \u0026\u0026 x != '') {\\n $('h1').text(x + '獲勝');\\n }\\n}\\n\\n$('button').click(function () {\\n $('.js-winner').text('開始比賽!');\\n $('.grid div').text('');\\n $('.grid div').css('background-color', '#78bec5');\\n});\"}","created_at":"2019-01-21T10:51:49.712+08:00","updated_at":"2021-07-28T22:22:57.591+08:00","name":"井字遊戲","language":"web","screenshot":{"url":"https://cdn4.koding.school/uploads/project/screenshot/54434/04e0e97533415d9edeb7a126605b1f2a.jpg"},"parent_id":21867,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":324,"hashid":"d5msqd3y","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
到這台電腦