獲取外鏈
-
encodeURI 與 encodeURIComponent
encodeURI 是用來處理整個 URI 的赫模,它應該接受 URI 的 protocol, host, port 等部分侥涵,只對 path 和 query 進行編碼锥忿。
而 encodeURIComponent 是用來編碼你準備用作 query 一部分的字符串的。
知乎 -
URL 是 URI 的子集衣赶。任何東西垦梆,只要能夠唯一地標識出來匹颤,都可以說這個標識是 URI 。如果這個標識是一個可獲取到上述對象的路徑托猩,那么同時它也可以是一個 URL 印蓖;但如果這個標識不提供獲取到對象的路徑,那么它就必然不是 URL 京腥。
HTML 結(jié)構(gòu)
CSS 布局
模塊化赦肃、MVC
EventHub
- 發(fā)布/訂閱模式
- 深拷貝 JSON.parse(JSON.stringify(object))
step 3
- 監(jiān)聽 upload
- 監(jiān)聽 form submit
- 獲取歌曲列表
- select songList songItem active, 取消 新建歌曲 active
- 選中歌曲后在表單展示歌曲信息
- 新建時清空數(shù)據(jù)
- 新建和編輯狀態(tài)切換
- 更新數(shù)據(jù)后刷新視圖
- 修復各種 bug
step 4
- 添加 loading
- 上傳加鎖
- 首頁tab切換
- 引入模塊
- 獲取最新歌曲
- 播放頁獲取歌曲信息
- 播放和暫停(先嘗試下)
- 播放時動畫
step 5
- 歌曲播放
- 歌詞滾動
step 6
- 手機端調(diào)試
手機頁面如何調(diào)試
- 使用alert
// 手機頁面調(diào)試,定位錯誤代碼
window.onerror = function(error, file, row){
alert(error)
alert(file)
alert(row)
}
``
2. 重寫console或者使用庫(vconsole)
# API
- jQuery
+ [.find()](https://www.jquery123.com/find/)
+ [.empty()](https://www.jquery123.com/empty/)
+ [.val()](https://www.jquery123.com/val/)
+ [.text()](https://www.jquery123.com/text/)
+ [.attr()](https://www.jquery123.com/attr/)
- css
+ [pointer-events](https://developer.mozilla.org/zh-CN/docs/Web/CSS/pointer-events)
- dom
+ [Element.getBoundingClientRect()](https://developer.mozilla.org/zh-CN/docs/Web/API/Element/getBoundingClientRect)