当单击段落元素时显示它的文本内容,以下哪句可以实现该功能?()
第1题:
下列程序运行后,单击命令按钮,窗体显示的结果为( )。 Private Function pl(x As Integer,y As Integer,z As Integer) pl=2*x+y+3*z End Function Private Function p2(X As Integer,y As Integer,z As Integer) p2=p1(z,y,x)+x End Function Private Sub Commandl_Click()
A.23
B.19
C.21
D.22
第2题:
Avarobj = [name:"zhangsan",show:function(){alert(name);}];
Bvarobj = {name:"zhangsan",show:”alert()”};
Cvarobj = {name:"zhangsan",show:function(){alert(name);}};
Dvarobj = {name:"zhangsan",show:function(){alert();}};
第3题:
单击命令按钮时,下列程序的执行结果为
Private Sub Command1_Click()
Dim a As Integer, b As Integer, c As Integer
a=2: b=3: c=4
Print P2(c, b, A.
End Sub
Private Function P1(x As Integer, y As Integer, z As Integer)
P1=2 * x + y + 3 * z
End Function
Private Function P2(x As Integer, y As Integer, z As Integer)
P2=P1(z, x, y) + x
End Function ( )。
A.21
B.19
C.17
D.34
第4题:
窗体上有两个文本框Text1、Text2以及一个命令按钮Command1,编写下列程序:
Dim y As Integer
Private Sub Command1_Click()
Dim x As Integer
x=2
Text1.Text=p2(p1(x),y)
Text2.Text=p1(x)
End Sub
Private Function p1(x As Integer)As Integer
x=x+y:y=x+y
p1=x+y
End Function
Private Function p2(x As Integer,y As Integer)As Integer
p2=2*x+y
End Function
当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。
A.2 4 2 4
B.2 4 4 8
C.4 4 8 8
D.10 10 58 58
第5题:
以下程序运行后,单击命令按钮,窗体显示的结果是 ______。 Private Function p1(x As Integer,y As Integel,z As Integer) p1=2*x+y+3*z End Function Private Function p2(x As Integer,y As Integer,z As Integer) p2=p1(2,y,x)+x End Function Private SubCommandl_Click() Dim a As Integer Dim b As Integer Dim c As Integer a=2:b=3:c=4 Print p2(c,b,A)
End Sub
A.19
B.21
C.22
D.23
第6题:
(27)窗体上有两个文本框Text1、Text2以及一个命令按钮Commandl,编写下列程序: Dim y As Integer Private Sub Command1_Click() Dim x As Integer x=2 Text1Text=p2(p1(x),y) Text2Text=p1(x) End Sub Private Function pl(x As Integer) As Integer x=x+y:y=x+y pl=x+y End Function Private Function p2(x As Integer,By Val y As Integer) p2=2*x+y End Function 当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为 A.2 4 2 4 B.2 44 8C.4 4 8 8 D.10 1058 58
第7题:
单击命令按钮之后,下列程序代码的执行结果为______。 Private Function P(N As Integer) Static sum For I=I To N Sum = sum +1 Next I P =sum End Function Private Sub Command1_Click() S=P(1)+P(2)+P(3)+P(4) Print S: End Sub
A.20
B.30
C.115
D.135
第8题:
单击一次命令按钮后,下列程序的执行结果是
Private Sub Command1_Click()
s=P(1) + P(2) + P(3) + P(4)
Print s
End Sub
Public Function P(N As Integer)
Static Sum
For i=1 To N
Sum=Sum + i
Next i
P=Sum
End Function( )。
A.15
B.25
C.35
D.45
第9题:
窗体上有两个文本框Text1、Text2以及一个命令按钮Command1,编写下列程序:
DimY As Integer
Private Sub Command1 Click( )
Dim X As Integer
x=2
Text1.Text=p2(p1(X),Y)
Text2.Text=p1(x)
End Sub
Private Function p1(X As Integer)As Integer
x+x+v: y=x+y
p1=x+y
End Function
Private Function p2(X As Integer,Y As Integer)As Integer
p2=2*x+y
End Function
当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。
A.2 4
2 4
B.2 4
4 8
C.4 4
8 8
D.10 10
58 58
第10题:
窗体上有两个文本框Text1、Text2以及一个命令按钮Command1,编写下列程序: Dim y As IntegerPrivate Sub Command1_Click()Dim x As Integer x=2 Text1.Text=p2(p1(x), y) Text2.Text=pi(x)End SubPrivate Function p1(x As Integer) As Integer x=x+y:y=x+y p1=x+yEnd FunctionPrivate Function p2(x As Integer, y As Integer) As Integer p2=2*x+yEnd Function 当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。
A.2 4 2 4
B.2 4 4 8
C.4 4 8 8
D.10 10 58 58