社区
JavaScript
帖子详情
failed to execute 'getComputedStyle' on 'Window' : parameter 1 is not of type 'E
weixin_45599200
2019-09-02 11:22:41
有没有大佬看看怎么解决?这个getComputedStyle有什么问题啊
...全文
2738
2
打赏
收藏
failed to execute 'getComputedStyle' on 'Window' : parameter 1 is not of type 'E
有没有大佬看看怎么解决?这个getComputedStyle有什么问题啊
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
囧
2019-09-03
打赏
举报
回复
setTimeout用move方法里一样的
#麻辣小龙虾#
2019-09-03
打赏
举报
回复
getComputedStyle是在window下的用于计算元素的最后样式的,这个没有问题,报错是因为你传参的时候传的不是一个元素,应该是你那个this.div的值没有初始化成一个dom元素,所以导致报错。
Failed
to
execute
'get
Com
pute
dSt
yle
' on '
Window
':
parameter
1 is not of
type
'Element'
Write By Monkeyfly 以下内容均为原创,如需转载请注明出处。 前提 复制了一份别人写的自定义的显示隐藏方法,准备在我的js中用一下,结果使用后刚一运行就报错了。 问题代码如下所示: //自定义的控制显示或隐藏的方法,该方法接收两个参数,参数1表示要显示的元素,参数2表示要隐藏的元素(参数可以为空) function showOrhide(show,hide){...
【未解决】
Failed
to
execute
‘get
Com
pute
dSt
yle
‘ on ‘
Window
‘:
parameter
1 is not of
type
‘Element‘
Failed
to
execute
'get
Com
pute
dSt
yle
' on '
Window
':
parameter
1 is not of
type
'Element'.
Uncaught
Type
Error:
Failed
to
execute
‘get
Com
pute
dSt
yle
‘ on ‘
Window
‘:
parameter
1 is not of
type
‘El
swiper报错如下 Uncaught
Type
Error:
Failed
to
execute
‘get
Com
pute
dSt
yle
’ on ‘
Window
’:
parameter
1 is not of
type
‘Element’. 原因及解决办法: 如下代码的加粗位置的元素必须是 .swiper-container,否则就会报错,并且轮播无法使用 ··· var indexBanner = ...
报错
Failed
to
execute
'get
Com
pute
dSt
yle
' on '
Window
':
parameter
1 is not of
type
'Element'.
使用jquery.datetimepicker.full.min.js报错 经过无数次操作,找到报错的操作过程: 操作一次时间控件,切换到其他页面,打开控制台,拉动控制台缩放大小,这个时候就会发现一直报错 报错原因是,拖动控制台的时候,获取不到控件的根元素,无法给控件定位 查看报错信息
window
.get
Com
pute
dSt
yle
(e),提示e不是元素,打印结果为null 在...
Uncaught
Type
Error:
Failed
to
execute
'get
Com
pute
dSt
yle
' on '
Window
':
parameter
1 is not
Uncaught
Type
Error:
Failed
to
execute
'get
Com
pute
dSt
yle
' on '
Window
':
parameter
1 is not
JavaScript
87,910
社区成员
224,616
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章