没有javascript响应

TIt*_*moo 0 html javascript

我不明白为什么,但这个简单的代码没有给我任何回应:

function funcs() {
  document.getElementById("big").display = "none";
}
Run Code Online (Sandbox Code Playgroud)
<p id="big"> I am big</p>
<button onclick="funcs()">dissapear</button>
Run Code Online (Sandbox Code Playgroud)

这应该big是在单击按钮时使id为disapear 的段落.

小智 5

你必须在style这里添加:

document.getElementById("big").style.display="none";
Run Code Online (Sandbox Code Playgroud)