<!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'; }}為什么會報這個錯,怎么改??
hide.js:5 Uncaught TypeError: Cannot read property 'style' of undefined
kathria
2017-07-14 10:22:14