我用js为什么老是隐藏不了控件啊,写了几种方法都没用:
daily_test_question是form标签,myanswer5是个radio,就是我要隐藏的控件
1,2,3为3中方法
function Dis()
{
1:
var disPlay;
disPlay = document.getElementById("myanswer5");
disPlay.style.display = "none";
2:
window.daily_test_question.myanswer5.style.display = "none";
3:
var disPlay;
disPlay = document.getElementById("daily_test_question.myanswer5");
disPlay.style.display = "none";
}
window.onload = Dis();//页面加载时运行
到底怎么做才能隐藏控件?
跃然一笑