题目内容

以下可以控制id属性值为"nav"的元素的color属性为“绿色”的是( )。

A. document.getElementById("nav").style.color = "green"
B. document.getElementsById("nav").style.color = "绿色"
C. document.getElementsById("nav").style.color = "green"
D. document.getElementById("nav").style.color = "绿色"

查看答案
更多问题

以下可以实现修改表单login中input控件password的输入类型为密码的表达式是( )。

A. login.password.setAttribute("type":"password")
B. login.password.getAttribute("type","password")
C. login.password.getAttribute("type":"password")
D. login.password.setAttribute("type","password")

以下可以实现在单击element对象时,在控制台输出“YES”字符串的是( )。

A. element.onclick = function(){ console.log("YES"); }
B. element.onclick = function(){ alert("YES"); }
C. element.onfocus = function(){ console.log("YES"); }
D. element.onfocus = function(){ alert("YES"); }

CSS的使用方式包括()。

A. 行内样式表
B. 内部样式表
C. 外部样式表
D. 导入样式表

独立的css文件,可以通过以下()途径被html文件使用

A. script标签,src属性链接
B. link标签,href属性链接
C. @import url(css文件路径和地址)导入
D. a标签href属性链接

答案查题题库