全局变量与局部变量问题,萌新提问~
匿名函数不能直接应用全局变量吗?我这样写就不执行了?
var mychar = document.getElementById("con"); function hidetext(){ //var mychar = document.getElementById("con"); mychar.style.display="none"; } function showtext(){ //var mychar = document.getElementById("con"); mychar.style.display="block"; }