推 icydream: 不能正常執行的錯誤訊息是? 03/16 16:42
想要新增一筆待辦清單 輸入完內容 按確認 網頁沒有反應
https://imgur.com/cuFHjPG
https://imgur.com/jWTWfUl
※ 編輯: wahahahaaa (118.161.79.20 臺灣), 03/16/2020 17:00:23
→ tino1991: js Line:10, 21 的newList() 在哪? 03/16 17:17
→ tino1991: 瀏覽器按F12應該有console可以看 03/16 17:20
newList()漏寫, 程式碼已修正 還有補寫一editList(id)方法
試跑一次後看console 如下:
https://imgur.com/BqsSQ1h
https://imgur.com/ZAvGd4n
※ 編輯: wahahahaaa (118.161.79.20 臺灣), 03/16/2020 18:04:50
→ tino1991: $是jQuery, 你要先載入再拿來用 html Line:5, 6順序交換 03/16 18:56
→ tino1991: Js Line:10 ajax的callback fn只有res, data是多餘的? 03/16 19:01
→ brianwu1201: 貼 github 上來吧 03/16 20:21
→ wahahahaaa: Line5&6交換後可以新增清單了!!!感謝t大!! 03/16 20:47
→ wahahahaaa: (res, data) 改成 --> (res.data) 03/16 20:50
→ wahahahaaa: 可以運行了~~^^ 03/16 20:50