{"id":33719,"student_id":1486,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n\\t\u003ctitle\u003eWcDonald's Order Service\u003c/title\u003e\\n\\t\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=\\\"top\\\"\u003e\u003cspan\u003eWcDonald's Order Service\u003c/span\u003e\u003c/div\u003e\\n \u003cdiv id=\\\"messages\\\"\u003e\\n \\n \u003c/div\u003e\\n \u003cdiv id=\\\"bottom\\\"\u003e\\n \u003cinput id=\\\"text\\\" /\u003e\\n \u003c/div\u003e\\n \u003cscript\u003e\\n \u003c/script\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\",\"css\":\"html, body {\\n width: 100%;\\n height: 100%;\\n margin: 0 auto;\\n}\\n\\n*{\\n font-family: 'Segoe UI';\\n}\\n\\n#top {\\n border-bottom: 4px #aaaaaa solid;\\n position: absolute;\\n width: 100%;\\n height: calc(10% - 4px);\\n top: 0%;\\n background-color: #dfdfdf;\\n}\\n\\n#top \u003e span {\\n display: block;\\n font-size: 2.35em;\\n color: #333333;\\n position: relative;\\n top: 50%;\\n text-align: center;\\n transform: translateY(-50%);\\n}\\n\\n#messages {\\n position: absolute;\\n display: block;\\n overflow-y: scroll;\\n width: 100%;\\n height: 80%;\\n top: 10%;\\n background-color: #f8f8f8;\\n}\\n\\n#bottom {\\n position: absolute;\\n width: 100%;\\n height: 10%;\\n top: 90%;\\n}\\n\\n#text {\\n color: #333333;\\n font-size: 30px;\\n border: 2px #dfdfdf solid;\\n padding: 10px;\\n left: 3px;\\n position: relative;\\n resize: none;\\n width: calc(100% - 4px - 20px - 6px);\\n height: calc(100% - 4px - 20px - 3px);\\n margin: 0;\\n background-color: #dfdfdf;\\n transition: border-color 0.3s, background-color 0.3s;\\n}\\n\\n#text:focus {\\n border-color: #44aadd;\\n background-color: #f2f2f2;\\n}\\n\\n#text:hover {\\n background-color: #f2f2f2;\\n}\\n\\n.container {\\n font-size: 20px;\\n display: block;\\n position: relative;\\n width: calc(100% - 2px - 20px - 20px);\\n height: auto;\\n border: 2px solid #dedede;\\n background-color: #f1f1f1;\\n border-radius: 5px;\\n padding: 10px;\\n left: 10px;\\n margin: 10px 0px;\\n}\\n\\n.darker {\\n border-color: #ccc;\\n background-color: #ddd;\\n}\\n\\n.container::after {\\n content: \\\"\\\";\\n clear: both;\\n display: table;\\n}\\n\\n.time-right {\\n float: right;\\n color: #aaa;\\n}\\n\\n.time-left {\\n float: left;\\n color: #999;\\n}\",\"js\":\"var date = new Date();\\nvar stat = 0;\\n\\nfunction get(text){\\n $(\\\"#messages\\\").append(`\\n \u003cdiv class=\\\"container darker\\\"\u003e\\n \u003cp\u003e${text}\u003c/p\u003e\\n \u003cspan class=\\\"time-right\\\"\u003e${date.getHours() + ':' + date.getMinutes()}\u003c/span\u003e\\n \u003c/div\u003e\\n `);\\n $(\\\"#messages\\\").animate({ scrollTop: 1000000000000});}\\nfunction post(text){\\n $(\\\"#messages\\\").append(`\\n \u003cdiv class=\\\"container\\\"\u003e\\n \u003cp\u003e${text}\u003c/p\u003e\\n \u003cspan class=\\\"time-right\\\"\u003e${date.getHours() + ':' + date.getMinutes()}\u003c/span\u003e\\n \u003c/div\u003e\\n `);\\n if(stat === 0){\\n if(text == 'A' || text == 'B' || text == 'C'){\\n stat++;\\n get('內用還是帶走?');\\n }else{\\n get('error!');\\n get(`A,B或C套餐?`);\\n stat = 0;\\n }\\n }else if(stat == 1){\\n if(text == '內用' || text == '帶走'){\\n stat++;\\n get(`${text}是吧? 請問您要如何付費? 刷卡還是現金?`);\\n }else{\\n get('error!');\\n get(`A,B或C套餐?`);\\n stat = 0;\\n }\\n }else if(stat == 2){\\n if(text == '刷卡' || text == '現金'){\\n stat++;\\n get(`感謝您使用本服務。`);\\n }else{\\n get('error!');\\n get(`A,B或C套餐?`);\\n stat = 0;\\n }\\n }\\n $(\\\"#messages\\\").animate({ scrollTop: 1000000000000});\\n}\\n\\n\\n\\nget(`A,B或C套餐?`);\\n\\n$(\\\"#text\\\").on(\\\"keypress\\\", function(e){\\n if(e.keyCode == 13){\\n post($(\\\"#text\\\").val());\\n $(\\\"#text\\\").val(\\\"\\\");\\n }\\n});\\n\"}","created_at":"2018-07-05T12:05:13.888+08:00","updated_at":"2019-10-26T05:09:43.964+08:00","name":"chat room","language":"web","screenshot":{"url":"https://cdn5.koding.school/uploads/project/screenshot/33719/d2e0ec380e7119172e3ab6f827688f4d.jpg"},"parent_id":null,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":211,"hashid":"wdkswj86","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
到這台電腦