原创 js - prototype
const Pro = function (obj) { this.elem = obj.elem; this.init(); }; Pro.prototype = { data: { }, init: functio
原创 js - 閉包
/* * 閉包 * 定義於一個內存空間裏的函數, 這個內存空間可以是一個函數 (包括 window函數 和 匿名函數), 可以是一個變量對象 * 一個內存空間裏, 調用的變量, 保留於內存; 不被調用的, 就被銷燬 被調用閉包如果
原创 jQ - DOM
節點操作 $('ul').append($('li:first')) // ul內部後插入第一個li, 相當於把第一個li移動到ul內部後 $('ul').prepend($('li:last')) // ul內部前插入最後一個li
原创 jQ - ajax
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <form οnsubm
原创 jQ - mobile
$().tap(testAlert); $().taphold(testAlert); $().swipe(testAlert); $().swipeleft(testAlert); $().swiperight(testAlert)
原创 HTML - 基礎篇
W3C, 萬維網聯盟(World Wide Web Consortium), 是Web領域的國際標準化組織, 開發開放Web標準 頁面優化 文檔聲明, 標題前編碼, 元信息, 註釋, 代碼縮進, 上線前代碼壓縮, 製作404頁面,
原创 git
/* * 查看記錄後怎麼繼續操作(無法輸入命令) -- ctrl + z * 怎麼默認遠程版本庫目錄路徑和配置git命令的別名, 而不會重啓Bash後重置 * 後期打標籤, 沒怎麼看 * git fetch, 在git log中也
原创 jquery.eraser.js
(function($){var methods={init:function(options){return this.each(function(){var $this=$(this),data=$this.data('eraser
原创 js - 外傳
時間 new Date('2018-01-01 01:01:01'); // 部分移動設備不能解析 new Date('2018/01/01 01:01:01'); // 正解 base64加密 window.btoa(unescap
原创 vue
/* * vue筆記 * 2.x * https://cdn.bootcss.com/vue/2.5.21/vue.js * https://cdn.bootcss.com/vue/2.5.21/vue.min.js * 不支持ie8及
原创 刮刮卡
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> img { display:
原创 jQ - animate
// 顯示和隱藏, toggle() $('p').show('slow'); // hide() $('p').animate({ height: 'show', width: 'show', opacity: 'sho
原创 表格
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> body { margin:
原创 js - 倒計時
/* * @ qp * 倒計時 * $.qpTime({ s: 開始, // 時間戳 / Date e: 結束, m: 毫秒 }, function (e) { e = { d: 天, h: 時, m: 分, s
原创 js - 雜記
// 命名規範 變量/屬性 以名詞開頭, 以下劃線分割 方法/函數 以動詞開頭, 遵循小駝峯 常量全大寫 構造函數首字母大寫 // 獲取標籤 document.querySelector(''); document.qu