单项选择题
要获取一个ID为username的表单元素的值,不正确的代码是()
A.document.username.value
B.document.all.username.value
C.document.getElementById(“username”).value
D.如果表单元素外层无表单,则可以直接使用username.value
点击查看答案
相关考题
-
单项选择题
在JavaScript中,以下代码能产生输出的是()
A.document.write()
B.window.write()
C.document.confirm()
D.write “The Undefined Function” -
单项选择题
在JavaScript中,以下代码能并闭一个窗口的是()
A.window.exit()
B.window.shutdown()
C.window.end()
D.window.close() -
单项选择题
下列名称中,能作为变量名的是()
A.pArray
B.this
C.function
D.*pNumber
