{"id":44568,"student_id":1440,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n \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.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 \u003ctextarea id=\\\"input\\\" class=\\\"form-control\\\" rows=\\\"2\\\" placeholder=\\\"要加密的訊息...\\\"\u003e\u003c/textarea\u003e\\n \u003cbutton class=\\\"form-control btn btn-primary\\\"\u003e解密\u003c/button\u003e\\n \u003ctable class=\\\"table table-striped bg-light\\\"\u003e\\n \u003cthead\u003e\\n \u003ctr\u003e\\n \u003ctd\u003e文字\u003c/td\u003e\\n \u003ctd\u003e二進位碼\u003c/td\u003e\\n \u003c/tr\u003e\\n \u003c/thead\u003e\\n \u003c/table\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\",\"css\":\"\",\"js\":\"var list = []\\nvar input\\nvar idx\\n\\n$('#input').keyup(function() {\\n start()\\n})\\n\\n$('button').on(\\\"click\\\", function() {\\n $('table').html(\\\"\\\")\\n $('#input').val(\\\"\\\")\\n if ($('button').text() == '解密') {\\n $('button').text(\\\"加密\\\")\\n $('#input').attr('placeholder', '要解密的訊息...')\\n $('title').text(\\\"二進位解密\\\")\\n $('table').append('\u003cthead\u003e\u003ctr\u003e\u003ctd\u003e二進位碼\u003c/td\u003e\u003ctd\u003e文字\u003c/td\u003e\u003c/tr\u003e\u003c/thead\u003e')\\n } else {\\n $('button').text(\\\"解密\\\")\\n $('#input').attr('placeholder', '要加密的訊息...')\\n $('title').text(\\\"二進位加密\\\")\\n $('table').append('\u003cthead\u003e\u003ctr\u003e\u003ctd\u003e文字\u003c/td\u003e\u003ctd\u003e二進位碼\u003c/td\u003e\u003c/tr\u003e\u003c/thead\u003e')\\n }\\n})\\n\\n//編碼\\nfunction start() {\\n $('table').html('')\\n input = $('#input').val()\\n list = []\\n if ($('button').text() == '解密') {\\n $('table').append('\u003cthead\u003e\u003ctr\u003e\u003ctd\u003e文字\u003c/td\u003e\u003ctd\u003e二進位碼\u003c/td\u003e\u003c/tr\u003e\u003c/thead\u003e')\\n if (input == \\\"全部\\\") {\\n\\n //創建顯示清單\\n for (var i = 33; i \u003c 127; i++) {\\n list.push({\\n text: String.fromCharCode(i),\\n code: String.fromCharCode(i).charCodeAt()\\n })\\n }\\n } else {\\n\\n //創建顯示清單\\n for (var i = 0; i \u003c input.length; i++) {\\n if (input.charAt(i) == \\\" \\\") {\\n list.push({\\n text: \\\"\\\",\\n code: \\\"\\\"\\n })\\n } else {\\n list.push({\\n text: input.charAt(i),\\n code: input.charAt(i).charCodeAt()\\n })\\n }\\n }\\n }\\n\\n //載入顯示清單\\n for (var i = 0; i \u003c list.length; i++) {\\n add(list[i].text, list[i].code)\\n }\\n } else {\\n $('table').append('\u003cthead\u003e\u003ctr\u003e\u003ctd\u003e二進位碼\u003c/td\u003e\u003ctd\u003e文字\u003c/td\u003e\u003c/tr\u003e\u003c/thead\u003e')\\n if (input == \\\"全部\\\") {\\n\\n //創建顯示清單\\n for (var i = 33; i \u003c 127; i++) {\\n list.push({\\n text: i,\\n code: String.fromCharCode(i)\\n })\\n }\\n } else {\\n idx = input.split(\\\" \\\")\\n\\n //創建顯示清單\\n for (var i = 0; i \u003c idx.length; i++) {\\n if (idx[i]*1 == NaN) {\\n list.push({\\n text: idx[i],\\n code: idx[i]\\n })\\n } else {\\n list.push({\\n text: idx[i],\\n code: String.fromCharCode(idx[i]*1)\\n })\\n }\\n }\\n }\\n\\n //載入顯示清單\\n for (var i = 0; i \u003c list.length; i++) {\\n add(list[i].text, list[i].code)\\n }\\n }\\n}\\n\\n//加入顯示清單\\nfunction add(text, code) {\\n var item = `\u003cthead\u003e\u003ctr\u003e\u003ctd\u003e${text}\u003c/td\u003e\u003ctd\u003e${code}\u003c/td\u003e\u003c/tr\u003e\u003c/thead\u003e`\\n $('table').append(item)\\n}\"}","created_at":"2018-10-06T19:12:35.692+08:00","updated_at":"2020-06-08T20:16:26.886+08:00","name":"二進位加密/解密2.0","language":"web","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/44568/2d478ced52f5594b8c3c16be154fd9d0.jpg"},"parent_id":null,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":155,"hashid":"p93s39kz","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
到這台電腦