社区
JavaScript
帖子详情
failed to execute 'getComputedStyle' on 'Window' : parameter 1 is not of type 'E
weixin_45599200
2019-09-02 11:22:41
有没有大佬看看怎么解决?这个getComputedStyle有什么问题啊
...全文
2933
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元素,所以导致报错。
JS获取CSS样式(st
yle
/get
Com
pute
dSt
yle
/currentSt
yle
)
在JavaScript中,获取CSS样式的方法主要有两种:`element.st
yle
` 和 `
window
.get
Com
pute
dSt
yle
()` 或 `element.currentSt
yle
`(仅IE浏览器)。这些方法可以帮助开发者在运行时动态地读取或修改页面元素的样式。 ...
Failed
to
execute
'get
Com
pute
dSt
yle
' on '
Window
':
parameter
1 is not of
type
'Element'
Write By Monkeyfly 以下内容均为原创,如需转载请注明...//自定义的控制显示或隐藏的方法,该方法接收两个参数,参数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'.
【在qiankun模式下el-dropdown点击,浏览器报
Failed
to
execute
‘get
Com
pute
dSt
yle
‘ on ‘
Window
‘:
parameter
1 is not o
跳转子应用后,el-dropdown-menu点击,浏览器报浏览器报
Failed
to
execute
‘get
Com
pute
dSt
yle
’ on ‘
Window
’:
parameter
1 is not of
type
‘Element’` 错误。在计算样式时,可能无法正确获取 DOM 元素,导致。...
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' 解决方案: 在没有主动调用该方法进行某些高深Dom操作的情况下,反思一下自己是不是在vue html部分...
JavaScript
87,993
社区成员
224,694
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章