为了账号安全,请及时绑定邮箱和手机立即绑定

hide.js:5 Uncaught TypeError: Cannot read property 'style' of undefined

hide.js:5 Uncaught TypeError: Cannot read property 'style' of undefined

kathria 2017-07-14 10:22:14
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script src="debug.js"></script> <script src="hide.js"></script> </head> <body> hello <button  style="background: cornflowerblues;" onclick="hide(this.true);debug('hide button1');">hide1</button> world </body></html>function hide(e,reflow){ if(reflow){ e.style.display='none'; }else{ e.style.visibility='hidden'; }}为什么会报这个错,怎么改??
查看完整描述

1 回答

已采纳
?
李晓健

TA贡献1036条经验 获得超461个赞

onclick="hide(this,true)"

多个参数是逗号分隔!

查看完整回答
反对 回复 2017-07-14
  • 1 回答
  • 0 关注
  • 1654 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信