单选题 有语句“var x=0;while(____) x+=2;”,要使while循环体执行10次,空白处的循环判定式应写为:

A、 x<10
B、 x<=10
C、 x<20
D、 x<=20
下载APP答题
由4l***h9提供 分享 举报 纠错

相关试题

单选题 下面哪一个不是JavaScrip运算符?

A、=
B、===
C、&&
D、$

单选题 要动态改变层中的内容可以使用下列( )方法。

A、利用层的innerHTML改变内容
B、利用层的visibility属性来实现
C、可以通过设置层的隐藏和显示来实现
D、可以通过设置层的样式属性display属性来实现

单选题 若要将一个 标记(其id为”p2”)移动到另一个 标记(其id为”p1”)之前, 已知: p1=document.getElementById(\p1\"); p2=document.getElementById(\"p2\"); 则可以使用以下语句( )。

A、p2.insertBefore(p1)
B、p1.insertBefore(p2)
C、p2.parentNode.insertBefore(p2,p1)
D、p2appendNode(p1)

单选题 若 var num = 10.55; 则 num.toFixed(1) 的值为()

A、10.5
B、10.6
C、10
D、105.5

单选题 在JavaScript中,下列定义数组的方法正确的是( )。

A、emp=new Array[3];
B、emp=new Array(3)
C、emp=new ()array;
D、emp=new Array[];

单选题 以下( )语句用于访问person的第4个元素。

A、person[4]
B、person[3]
C、person(4)
D、person(3)

单选题 使用String对象的indexOf()方法查找字符串”hello world”中是否包含G,下列语句描述正确的是( )

A、字符串\hello world\"中不包含G字符,indexOf返回0"
B、字符串\hello world\"中不包含G字符,indexOf返回null"
C、字符串\hello world\"中不包含G字符,indexOf返回-1"
D、字符串\hello world\"中不包含G字符,indexOf返回1"

单选题 在HTML页面上,当按下键盘上的任意一个键时都会触发Javascript的( )事件。

A、onFocus
B、onBlur
C、onSubmit
D、onKeyDown