单项选择题

在HTML页面上包含如下创建层的语句,那么编写Javascript语句实现显示该层的语句错误的是()
< html> < body>
< div id=”imageLayer” style=”display:none;”>
< img src=”images/Sunset.jpg” width=”200” height=”100”>
< /div>
< /body>
< html>

A.document.getElementByTagName(“div”)[0].style.display=”block” 
B.document.getElementById(“imageLayer”).style.display=”block”; 
C.document.getElementByName(“imageLayer”)[0].style.display=”block”; 
D.document.getElementByName(“imageLayer”).get(0).style.display=”block”;


您可能感兴趣的试卷

你可能感兴趣的试题

2.单项选择题在HTML文档中包含如下超链接,要实现当鼠标移入该链接时,超链接文本大小变为30px,选项中的编码正确的是()

A.<a href=”#”onmouseover=”this.style.font-size=30px”注册</a>
B.<a href=”#”onmouseout=”this.style.fontsize=30px”注册</a>
C.<a href=”#”onmouseover=”this.style.fontsize=30px”注册</a>
D.<a href=”#”onmouseout=”this.style.font-size=30px”注册</a>

3.单项选择题

如果在HTML页面中包含如下图片标签,则在下划线处添加()代码能够实现隐藏该图片的功能。
< img id=”pic” src=”Sunset.jpg” width=”400” height=”300” _____ >

A. style=”display:visible”; 
B. style=”display:disvisible”; 
C. style=”display:block”; 
D. style=”display:none”; 

4.单项选择题

如果在HTML页面中包含如下图片标签,则选项中的()语句能够实现隐藏该图片的功能。
< img id=”pic” src=”Sunset.jpg” width=”400” height=”300”>

A.document.getElementById(“pic”).style.display=”visible”; 
B.document.getElementById(“pic”).style.display=”disvisible”; 
C.document.getElementById(“pic”).style.display=”block”; 
D.document.getElementById(“pic”).style.display=”none”;

5.单项选择题Javascript中制作图片代替按钮的提交效果需要手动提交方法submit(),以下调用正确的是()

A.submit();
B.myform.submit()
C.document.myform.submit()
D.window.myform.submit();

7.单项选择题在HTML页面中包含一个按钮控件mybutton,如果要实现点击该按钮时调用已定义的Javascript函数compute,要编写的HTML代码是()

A.<input name=”mybutton” type=”button” onBlur=”compute()”value=”计算”> 
B.<input name=”mybutton” type=”button” onFocus=”compute()”value=”计算”> 
C.<input name=”mybutton” type=”button” onClick=”function compute()”value=”计算”> 
D.<input name=”mybutton” type=”button” onClick=”compute()”value=”计算”>

8.单项选择题下列选项中关于浏览器对象的说法错误的是()

A.history对象记录了用户在一个浏览器中已经访问过的URLs
B.location对象相当于IE浏览器中的地址栏,包含关于当前URL地址的信息
C.location对象是history对象的父对象
D.location对象是window对象的子对象

10.单项选择题在HTML页面上编写Javascript代码时,应编写在()标签中间。

A.<javascript>和</javascript>
B.<script>和</script>
C.<head>和</head>
D.<body>和</body>