<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>问题3</title> <script type="text/javascript"> var x; x=document.getElementById("why").innerHTML; console.log(x); </script> </head> <body> <div id="why"> 在控制台会输出什么?为什么会这样子? </div> </body> </html> <body> <div> 点击下面的一句话,会出现什么效果?为什么会这样子? </div> <div id="why"> why are you so beautifully </div> <script type="text/javascript"> var x=0; document.getElementById(why).onclick=function(){ x=1; } if(x==1){ document.getElementById(why).innerHTML="i dont't konw why"; } </script> </body>
慕的地6079101
劲哥哥
慕哥555261
Ailivin
跨越七海的_风
慕田峪3574798
取个名字这么难呢
相关分类