下面的代码在jsfiddle.net上可以运行,在chrome和Firefox上没反应?IDE是WebStorme代码一直出错,放到jsfiddle.net上却可以,弄到有点怀疑人生了...<!DOCTYPE html><html><head> <meta charset="UTF-8"> <script> function show() { var value2=document.getElementById("hello_2"); value2.style.visibility="visible"; } var value1=document.getElementById("hello_1"); value1.addEventListener("click",show,false); </script> <style> </style></head><body><button id="hello_1">hello</button><div id="hello_2" style="color: yellow;visibility: hidden">hello</div></body></html>
添加回答
举报
0/150
提交
取消