{"id":95181,"student_id":10,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n\\t\u003ctitle\u003eDocument\u003c/title\u003e\\n\\t\u003cscript src=\\\"https://code.jquery.com/jquery-3.4.1.min.js\\\"\u003e\u003c/script\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n \u003ch1\u003e待辦事項\u003c/h1\u003e\\n \\n \u003c!-- 新增表單 --\u003e\\n \u003cdiv class=\\\"box\\\"\u003e\\n \u003cinput id=\\\"input\\\"/\u003e\\n \u003cspan id=\\\"create\\\"\u003e新增\u003c/span\u003e\\n \u003c/div\u003e\\n \\n \u003c!-- 事項列表 --\u003e\\n \u003cdiv class=\\\"box\\\"\u003e\\n \u003cdiv id=\\\"list\\\"\u003e\\n \u003cdiv class=\\\"item\\\"\u003e\\n \u003cspan class=\\\"text\\\"\u003e數學回家作業\u003c/span\u003e\\n \u003cspan class=\\\"delete\\\"\u003e移除\u003c/span\u003e\\n \u003cspan class=\\\"update\\\"\u003e修改\u003c/span\u003e\\n \u003c/div\u003e\\n \u003cdiv class=\\\"item\\\"\u003e\\n \u003cspan class=\\\"text\\\"\u003e自然報告\u003c/span\u003e\\n \u003cspan class=\\\"delete\\\"\u003e移除\u003c/span\u003e\\n \u003cspan class=\\\"update\\\"\u003e修改\u003c/span\u003e\\n \u003c/div\u003e\\n \u003cdiv class=\\\"item\\\"\u003e\\n \u003cspan class=\\\"text\\\"\u003e買水彩用品、筆記本\u003c/span\u003e\\n \u003cspan class=\\\"delete\\\"\u003e移除\u003c/span\u003e\\n \u003cspan class=\\\"update\\\"\u003e修改\u003c/span\u003e\\n \u003c/div\u003e\\n \u003cdiv class=\\\"item\\\"\u003e\\n \u003cspan class=\\\"text\\\"\u003e訂電影票\u003c/span\u003e\\n \u003cspan class=\\\"delete\\\"\u003e移除\u003c/span\u003e\\n \u003cspan class=\\\"update\\\"\u003e修改\u003c/span\u003e\\n \u003c/div\u003e\\n \u003cdiv class=\\\"item\\\"\u003e\\n \u003cspan class=\\\"text\\\"\u003e幫媽媽寄送包裹\u003c/span\u003e\\n \u003cspan class=\\\"delete\\\"\u003e移除\u003c/span\u003e\\n \u003cspan class=\\\"update\\\"\u003e修改\u003c/span\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e \\n \u003cspan id=\\\"deleteAll\\\"\u003e移除全部\u003c/span\u003e\\n \u003c/div\u003e\\n \\n\u003c/body\u003e\\n\u003c/html\u003e\",\"css\":\"body {\\n font-size: 1rem;\\n padding: 0px 30px;\\n min-height: 100vh;\\n background-image: linear-gradient(#ff6161,#ff768c);\\n}\\n\\nh1 {\\n color: #fff;\\n text-align: center;\\n}\\n\\n#input {\\n outline: none;\\n width: 300px;\\n font-size: 1rem;\\n padding: 5px 10px;\\n border: 1px solid #eee;\\n display: inline-block;\\n}\\n\\n#create {\\n padding: 5px 0px;\\n color: #369eff;\\n float: right;\\n cursor: pointer;\\n font-weight: bold;\\n}\\n\\n#deleteAll {\\n font-size: 0.9rem;\\n display: inline-block;\\n color: #ff768c;\\n padding: 10px 0px;\\n cursor: pointer;\\n}\\n\\n.box {\\n box-sizing: border-box;\\n width: 400px;\\n padding: 10px;\\n margin: auto;\\n border-radius: 1px;\\n margin-bottom: 20px;\\n background-color: #fff;\\n box-shadow: 0px 5px 2px rgba(0, 0, 0, .1);\\n}\\n\\n.item {\\n color: #555;\\n padding: 10px 0px;\\n border-bottom: 1px solid #eee;\\n}\\n\\n.update, .delete {\\n float: right;\\n padding: 0px 5px;\\n font-size: 0.9rem;\\n cursor: pointer;\\n opacity: 0.6;\\n}\\n.update {\\n color: #369eff;\\n}\\n.delete {\\n color: #ff768c;\\n}\\n.delete:hover, .update:hover {\\n opacity: 1;\\n}\\n\\n\",\"js\":\"var task = DB.table('task');\\n\\n$('#create').click(create); // 點擊「新增」時執行 create 指令\\n$('#deleteAll').click(deleteAll); // 點擊「移除全部」時執行 deleteAll 指令\\n$('#list').on('click', '.delete', deleteTask); // 點擊「刪除」時執行 deleteTask 指令\\n$('#list').on('click', '.update', updateTask); // 點擊「修改」時執行 updateTask 指令\\n\\n\\n// 專案預設執行時,查詢所有資料並更新至畫面\\ntask.read({}, updateList);\\n\\n// 新增一筆資料至資料庫\\nfunction create () {\\n var text = $('input').val();\\n $('input').val('');\\n task.create({ text: text });\\n task.read({}, updateList);\\n}\\n\\n// 將查詢資料庫的結果 data 更新至畫面上\\nfunction updateList (data) {\\n $('#list').empty();\\n for (var i=0; i\u003cdata.length; i++) {\\n var html = `\\n \u003cdiv class=\\\"item\\\" data-id=\\\"${data[i].id}\\\"\u003e\\n \u003cspan class=\\\"text\\\"\u003e${data[i].text}\u003c/span\u003e\\n \u003cspan class=\\\"delete\\\"\u003e移除\u003c/span\u003e\\n \u003cspan class=\\\"update\\\"\u003e修改\u003c/span\u003e\\n \u003c/div\u003e\\n \\n `\\n $('#list').append(html);\\n }\\n}\\n\\n// 移除全部的事項\\nfunction deleteAll () {\\n task.delete({});\\n task.read({}, updateList);\\n}\\n\\n// 更新事項內容\\nfunction deleteTask () {\\n var text = $(this).parent().find('.text').text();\\n task.delete({text: text});\\n task.read({}, updateList);\\n \\n // 最後一個 section\\n // var id = $(this).parent().data('id');\\n // task.delete({id: id});\\n}\\n\\n// 更新事項內容\\nfunction updateTask () {\\n var text = $(this).parent().find('.text').text();\\n var newText = prompt('內容 ?', text);\\n task.update({text: text}, { text: newText });\\n task.read({}, updateList);\\n \\n // 最後一個 section\\n // var id = $(this).parent().data('id');\\n // var newText = prompt('?');\\n // task.update({id: id}, { text: newText });\\n}\"}","created_at":"2019-09-10T10:55:16.563+08:00","updated_at":"2019-11-12T04:21:26.165+08:00","name":"待辦事項","language":"web","screenshot":{"url":"/uploads/project/screenshot/95181/0471a595957566608761fa3f48bd4835.jpg"},"parent_id":3,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":458,"hashid":"vngs6vzg","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
Orange Apple Learning Platform
My Projects
View Project Page
Export
Remix
Import
Delete
Download Android APP (APK)
Screenshot
Open Web Site
繁中
简中
English
日本語
1:1:1
1:1
Full Width
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer