使用e.target.dataset出現的問題

var path = e.currentTarget.dataset.imagePathhtml console.log(path);會輸出undefinedhtm 1)去掉data後面駝峯命名blog imagePath -> imagepathget   2)直接輸出e來查看console console.log(e)im   摘自https://www.cnblogs.com/xiaoli5
相關文章
相關標籤/搜索