WED201c_-_FA_2024_-_RE_3184.webp
U

WED201c_-_FA_2024_-_RE_3184.webp

Kizspy | Question: 24
(Choose 1 answer)

Consider the code:
<script>
function myMethod(){
var arr=["apple", "mango", "kiwi","orchid"];
[MISSING CODE]
} </script>
<form>
<input type="text" id="demo">
<input type="button" value="getValue" onclick="myMethod()"></form>
What code is added at [MISSING CODE] to set the text "mango" of the variable arr to the input tag with
id="demo"?
A. document.getElementById("demo").text=arr
B. document.getElementById("demo").value=arr[1]
C. document.getElementById("demo")=arr[1]
D. document.getElementById("demo").value=arr[2]
FUC

Thông tin

Category
WED201c
Thêm bởi
Uraraka2003
Ngày thêm
Lượt xem
3,909
Lượt bình luận
13
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom