{"id":40808,"student_id":86,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n\\t\u003ctitle\u003eDocument\u003c/title\u003e\\n \u003clink rel=\\\"stylesheet\\\" href=\\\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\\\"\u003e\\n \u003cscript src=\\\"https://code.jquery.com/jquery-3.2.1.slim.min.js\\\"\u003e\u003c/script\u003e\\n \u003cscript src=\\\"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js\\\"\u003e\u003c/script\u003e\\n \u003cscript src=\\\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js\\\"\u003e\u003c/script\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n \u003ch1 class=\\\"p-3 text-center js-winner\\\" id=\\\"change\\\"\u003e開始比賽\u003c/h1\u003e\\n \u003cdiv class=\\\"grid\\\"\u003e\\n \u003cdiv class=\\\"cell\\\" id=\\\"a\\\"\u003e\u003c/div\u003e\\n \u003cdiv class=\\\"cell\\\" id=\\\"b\\\"\u003e\u003c/div\u003e\\n \u003cdiv class=\\\"cell\\\" id=\\\"c\\\"\u003e\u003c/div\u003e\\n \u003cdiv class=\\\"cell\\\" id=\\\"d\\\"\u003e\u003c/div\u003e\\n \u003cdiv class=\\\"cell\\\" id=\\\"e\\\"\u003e\u003c/div\u003e\\n \u003cdiv class=\\\"cell\\\" id=\\\"f\\\"\u003e\u003c/div\u003e\\n \u003cdiv class=\\\"cell\\\" id=\\\"g\\\"\u003e\u003c/div\u003e\\n \u003cdiv class=\\\"cell\\\" id=\\\"h\\\"\u003e\u003c/div\u003e\\n \u003cdiv class=\\\"cell\\\" id=\\\"i\\\"\u003e\u003c/div\u003e\\n \u003c/div\u003e\\n \u003cdiv class=\\\"text-center mt-3\\\"\u003e\\n \u003cbutton class=\\\"btn btn-primary js-reset\\\" id=\\\"remove\\\"\u003e重新開始\u003c/button\u003e\\n \u003c/div\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\",\"css\":\"body {\\n background-color: #eee;\\n}\\n.grid {\\n width: 300px;\\n height: 300px;\\n display: flex;\\n flex-wrap: wrap;\\n margin: auto;\\n}\\n.cell {\\n border: 1px solid #ccc;\\n width: 100px;\\n height: 100px;\\n line-height: 100px;\\n text-align: center;\\n font-size: 3rem;\\n font-weight: 900;\\n}\",\"js\":\"var current = \\\"O\\\";\\n\\n$(\\\".cell\\\").click(function(){\\n if ($(this).text() === \\\"\\\") {\\n if (current === \\\"O\\\") {\\n $(this).text(current);\\n $(this).addClass(\\\"bg-warning\\\");\\n current = \\\"X\\\";\\n } else {\\n $(this).text(current);\\n $(this).addClass(\\\"bg-primary\\\");\\n current = \\\"O\\\";\\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 \\n if (a \u0026\u0026 b \u0026\u0026 c !== \\\"\\\") {\\n if (a === b \u0026\u0026 b === c) {\\n $(\\\"#change\\\").text(a + \\\"贏了\\\");\\n }\\n }\\n if (d \u0026\u0026 e \u0026\u0026 f !== \\\"\\\") {\\n if (d === e \u0026\u0026 e === f) {\\n $(\\\"#change\\\").text(d + \\\"贏了\\\");\\n }\\n }\\n if (g \u0026\u0026 h \u0026\u0026 i !== \\\"\\\") {\\n if (g === h \u0026\u0026 h === i) {\\n $(\\\"#change\\\").text(g + \\\"贏了\\\");\\n }\\n }\\n if (a \u0026\u0026 d \u0026\u0026 g !== \\\"\\\") {\\n if (a === d \u0026\u0026 d === g) {\\n $(\\\"#change\\\").text(a + \\\"贏了\\\");\\n \\n }\\n }\\n if (b \u0026\u0026 e \u0026\u0026 h !== \\\"\\\") {\\n if (b === e \u0026\u0026 e === h) {\\n $(\\\"#change\\\").text(b + \\\"贏了\\\");\\n }\\n }\\n if (c \u0026\u0026 f \u0026\u0026 i !== \\\"\\\") {\\n if (c === f \u0026\u0026 f === i) {\\n $(\\\"#change\\\").text(c + \\\"贏了\\\");\\n }\\n }\\n if (a \u0026\u0026 e \u0026\u0026 i !== \\\"\\\") {\\n if (a === e \u0026\u0026 e === i) {\\n $(\\\"#change\\\").text(a + \\\"贏了\\\");\\n }\\n }\\n if (c \u0026\u0026 e \u0026\u0026 g !== \\\"\\\") {\\n if (c === e \u0026\u0026 e === g) {\\n $(\\\"#change\\\").text(c + \\\"贏了\\\");\\n }\\n }\\n});\\n\\n$(\\\"#remove\\\").click(function(){\\n $(\\\".cell\\\").text(\\\"\\\");\\n $(\\\".cell\\\").removeClass(\\\"bg-primary\\\");\\n $(\\\".cell\\\").removeClass(\\\"bg-warning\\\");\\n});\"}","created_at":"2018-09-01T16:15:34.928+08:00","updated_at":"2019-11-01T16:30:03.355+08:00","name":"井字遊戲 副本","language":"web","screenshot":{"url":"https://cdn4.koding.school/uploads/project/screenshot/40808/64e5ed9ce3efe660092917c223be9594.jpg"},"parent_id":21936,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":98,"hashid":"gk4s8w25","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
前往網站頁面
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦