0

What is the corect instruction id paragraphe?

I have error line 28. https://code.sololearn.com/W6RVkKCFu1J2/?ref=app

12th Jul 2021, 3:54 AM
Malick Diagne
Malick Diagne - avatar
5 odpowiedzi
+ 2
Can you explain more about error? What you were expecting and what you are getting?
12th Jul 2021, 6:44 AM
sudhir meena
sudhir meena - avatar
+ 1
You have used wrong property. Add is not the correct property.
12th Jul 2021, 4:08 AM
Aasim Sayyed
Aasim Sayyed - avatar
+ 1
Malick Diagne you can use this also...prg.setAttribute("id", "example_id")
13th Jul 2021, 2:48 AM
sudhir meena
sudhir meena - avatar
0
It appears that you are trying to set an id for the paragraph element. The HTML Element object does not have a property nor method named idList. You can reference the link below to solve your issue. https://www.w3schools.com/jsref/dom_obj_all.asp
12th Jul 2021, 5:04 AM
ODLNT
ODLNT - avatar
0
I want to do something like paragraph.classList.add like id. I want to do JavaScript id. Thanks you sir.
12th Jul 2021, 7:01 AM
Malick Diagne
Malick Diagne - avatar