0

Fill in the blanks to select all images of the page and change their src attribute.

var arr=document. getElementsBayTagName("img"); for(var x=0; x<arr...........; x++) { arr[x]src="demo.jpg") }

14th Apr 2017, 5:49 PM
Abdelrahim Ismail
Abdelrahim Ismail - avatar
18 Respostas
+ 34
var arr=document.getElementsByTagName("img"); for(var x=0; x<arr.length; x++) { arr[x].src="demo.jpg"; }
14th Apr 2017, 5:53 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 2
var arr = document. getElementsByTagName("img"); for(var x=0; x<arr.length; x++) { arr[x].src = "demo.jpg"; }
27th Nov 2018, 4:39 PM
Luqman Abdulwasii
Luqman Abdulwasii  - avatar
+ 2
answer attr #img src
14th Jul 2019, 11:44 AM
Yeikol Armando Mahecha Barrero
Yeikol Armando Mahecha Barrero - avatar
+ 1
Fill in the blanks to set the alt attribute of the image with id="img", and alert the value of its src attribute.... $("#img")........("alt", "Demo"); alert($("...........").attr(".............")); Answer will be : attr, #img, src
10th Feb 2019, 6:22 PM
Md. Shahajahan Ali
Md. Shahajahan Ali - avatar
+ 1
don't answer follow my order's i am 109 years old
13th Aug 2020, 11:41 AM
omo daniel
omo daniel - avatar
+ 1
var arr=document.getElementsByTagName("img"); for(var x=0; x<arr.length; x++) { arr[x].src="demo.jpg"; }
15th Dec 2020, 9:00 PM
Turikumana Isaie
Turikumana Isaie - avatar
0
creat thank youšŸ™‹
14th Apr 2017, 6:48 PM
Abdelrahim Ismail
Abdelrahim Ismail - avatar
0
var arr = document. getElementsByTagName(" img "); for(var x=0; x<arr. length ; x++) { arr[x]. src = "demo.jpg"; }
23rd Mar 2018, 2:40 PM
Mahnoor Shahzad
Mahnoor Shahzad - avatar
0
thanks
6th Feb 2020, 1:24 PM
Bello Sani Shawai
Bello Sani Shawai - avatar
0
Answer is wrong why
1st Mar 2020, 7:18 AM
Mohammad Mamoon
0
span for x
30th Jul 2020, 7:42 AM
kedir.y
kedir.y - avatar
0
par removingchild node
30th Jul 2020, 7:45 AM
kedir.y
kedir.y - avatar
0
length and src
19th Aug 2020, 7:23 AM
Sok Pagnavath
Sok Pagnavath - avatar
0
img length src
9th Dec 2020, 5:45 AM
Seth Oliver C. Pozon
Seth Oliver C. Pozon - avatar
0
var arr = document. getElementsByTagName(" img "); for(var x=0; x<arr. length ; x++) { arr[x]. src = "demo.jpg"; }
9th Aug 2021, 1:18 PM
Owethu Sotomela
Owethu Sotomela - avatar
0
attr, #img, src
22nd Jan 2022, 11:55 AM
Dheeraj Prajapati
0
var arr = document. getElementsByTagName(" img "); for(var x=0; x<arr. length ; x++) { arr[x]. src = "demo.jpg"; }
1st Jan 2023, 3:52 PM
Ibrahim Alshibly
Ibrahim Alshibly - avatar
- 1
$("#img")........("alt", "Demo"); alert($("...........").attr(".............")); Answer will be : attr, #img, src
3rd Nov 2019, 4:41 PM
Ravindra kumar Kushwaha
Ravindra kumar Kushwaha - avatar