原文:【报错解决】Uncaught TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.

项目开发日记 bug多多篇 同时也是 实现一些功能 真的痛苦,写一天代码遇到的bug够我写三天博客。 今天是为了做一个头像功能,具体说是用户上传头像文件并且预览的功能。 HTML JS 在页面用户提交了头像文件后console报错Uncaught TypeError: Failed to execute readAsDataURL on FileReader : parameter is not ...

2022-04-20 16:45 0 12711 推荐指数:

查看详情

Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

今天复习了一下关于getComputedStyle的用法,遇到了小小的挫折。报错前的代码: 当然,这只是随便举的例子,然而却遇到了标题上面的报错,纠结了一会后,终于解决了。原来是获取dom元素时,应该通过标签中的id属性去获取,这样仅需要改为 var box ...

Tue Jul 16 07:08:00 CST 2019 0 3957
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM