通过javascript控制id=“d1”的div隐藏,使用的代码是( )
A: document.getElementById(“d1”).style.show = “false”;
B: document.getElementById(“d1”).style.show = “none”;
C: document.getElementById(“d1”).style.display = “false”
D: document.getElementById(“d1”).style.display = “none”;
A: document.getElementById(“d1”).style.show = “false”;
B: document.getElementById(“d1”).style.show = “none”;
C: document.getElementById(“d1”).style.display = “false”
D: document.getElementById(“d1”).style.display = “none”;
举一反三
- 通过javascript控制id=“d1”的div隐藏,使用的代码是( ) A: document.getElementById(“d1”).style.show = “false”; B: document.getElementById(“d1”).style.show = “none”; C: document.getElementById(“d1”).style.display = “false” D: document.getElementById(“d1”).style.display = “none”;
- 要通过脚本代码设置盒子div1为显示状态,需要使用的代码是 A: document.getElementById('div1').display='block' B: document.getElementById('div1').style.display='none' C: document.getElementById(div').style.display='block' D: document.getElementById('div1').style.display='block'
- 【多选题】在JavaScript中,以下()能隐藏id为flower的div A. document.getElementById("flower").style.display="none"; B. document.getElementById("flower").style.display="hidden"; C. document.getElementById("flower").style.visibility="none"; D. document.getElementById("flower").style.visibility="hidden"
- 以下哪个代码能实现将id为title的元素隐藏? A: document.getElementById("title").style.display = "none"; B: document.getElementsByName("title").style.display = "none"; C: document.getElementById("title").style.display = "block"; D: document.getElementsByClassName("title").style.display = "none";
- 使用JavaScript脚本进行表单数据验证时,需要使用document对象的哪个方法来获取表单元素? A: getElementbyid B: getElementById C: getElementBYId D: GetElementById