{"id":13967,"student_id":10,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n\\t\u003ctitle\u003eDocument\u003c/title\u003e\\n \u003cmeta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\"\u003e\\n \u003clink rel=\\\"stylesheet\\\" href=\\\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css\\\" integrity=\\\"sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb\\\" crossorigin=\\\"anonymous\\\"\u003e\\n \u003cscript src=\\\"https://code.jquery.com/jquery-3.2.1.slim.min.js\\\" integrity=\\\"sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN\\\" crossorigin=\\\"anonymous\\\"\u003e\u003c/script\u003e\\n \u003cscript src=\\\"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js\\\" integrity=\\\"sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh\\\" crossorigin=\\\"anonymous\\\"\u003e\u003c/script\u003e\\n \u003cscript src=\\\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js\\\" integrity=\\\"sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ\\\" crossorigin=\\\"anonymous\\\"\u003e\u003c/script\u003e\\n \u003clink rel=\\\"stylesheet\\\" href=\\\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css\\\"\u003e\\n \u003cscript src=\\\"https://code.jquery.com/jquery-3.2.1.js\\\"\u003e\u003c/script\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n \u003ch1\u003e今天午餐吃什麼?\u003cspan id=\\\"result\\\"\u003e\u003c/span\u003e\u003c/h1\u003e\\n \u003cinput id=\\\"input\\\" placeholder=\\\"拉麵 / 便當 / 三媽臭臭鍋...\\\"\u003e\u003c/input\u003e\\n \u003cbutton id=\\\"go-btn\\\" class=\\\"btn\\\"\u003e執行\u003c/button\u003e\\n \u003col id=\\\"list\\\"\u003e\\n \u003c/ol\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\",\"css\":\"body {\\n padding: 30px;\\n background-color: #f8f8f8;\\n}\\n\\n#list {\\n padding: 0px;\\n}\\n\\n#input {\\n width: 200px;\\n padding: 5px 10px;\\n border: 3px solid #ccc;\\n}\\n\\n.btn {\\n background-color: #4286f4;\\n color: #fff;\\n border: 0px;\\n border-radius: 5px;\\n padding: 5px 10px;\\n}\\n\\n#list li {\\n position: relative;\\n list-style-type: none;\\n display: block;\\n padding: 5px 10px;\\n width: 100%;\\n border-radius: 5px;\\n box-sizing: border-box;\\n border: 1px solid #ddd;\\n margin: 5px 0px;\\n}\\n\\n#list li .remove {\\n position: absolute;\\n right: 5px;\\n}\\n\\n.focus {\\n color: white;\\n background-color: #4286f4;\\n}\",\"js\":\"var list = DB.variables.list || [];\\n\\nfor (var i=0; i\u003clist.length; i++) {\\n addItem(list[i]);\\n}\\n\\n$('#input').keyup(function (e) {\\n if (e.which == 13) {\\n var text = $('#input').val();\\n if (!text) return;\\n $('#input').val('');\\n addItem(text);\\n list.push(text);\\n DB.variables.set('list', list);\\n }\\n});\\n\\n$('body').on('click', '.remove', function () {\\n $(this).parent().remove();\\n var index = list.indexOf($(this).prev());\\n list.splice(index, 1);\\n DB.variables.set('list', list);\\n});\\n\\n$('#go-btn').on('click', function () {\\n\\n $('#result').text('');\\n\\n var index = $('#list li').length;\\n\\n var speed = Math.random()*400*index + 1000;\\n\\n var offset = 0;\\n\\n var current = 0;\\n\\n var id = setInterval(function () {\\n\\n speed -= 1;\\n offset += speed;\\n\\n if (offset \u003e 40000) {\\n offset -= 40000;\\n current++;\\n if (current \u003e= index) current = 0;\\n\\n console.log(current);\\n }\\n\\n if (speed \u003c 0) {\\n clearInterval(id);\\n $('#result').text('吃' + $('.focus .content').text() + '!');\\n }\\n\\n $('#list li').removeClass('focus');\\n $($('#list li')[current]).addClass('focus');\\n });\\n});\\n\\nfunction addItem (text) {\\n $('#list').append($('\u003cli\u003e\u003cspan class=\\\"content\\\"\u003e' + text + '\u003c/span\u003e\u003cspan class=\\\"remove\\\"\u003e✖\u003c/span\u003e\u003c/li\u003e'));\\n}\"}","created_at":"2017-10-24T13:01:46.689+08:00","updated_at":"2019-11-10T03:14:09.087+08:00","name":"今天午餐吃什麼?","language":"web","screenshot":{"url":"https://cdn4.koding.school/uploads/project/screenshot/13967/9a9755a8d73960091b06aebb42732d10.jpg"},"parent_id":null,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":true,"views":1465,"hashid":"yeysvpdq","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
到這台電腦