为什么把获取元素储存在变量mychar这行代码放在函数外边不行?
var mychar = document.getElementById("con");
function hidetext()
{
mychar.style.display="none";
}
function showtext()
{
mychar.style.display="block";
}
var mychar = document.getElementById("con");
function hidetext()
{
mychar.style.display="none";
}
function showtext()
{
mychar.style.display="block";
}
2015-04-19
举报