+ 1

Someone mentioned that document.write breaks your HTML. What should I then use?

29th May 2020, 11:51 AM
Samir_Shah
Samir_Shah - avatar
6 Antworten
+ 4
You should never use document.write to make any webpages, use dom element access methods of document object instead, which are getElementById, getElementsByClassName, getElementsByTagName, getQuerySelector, getQuerySelectorAll.
29th May 2020, 12:08 PM
Calviղ
Calviղ - avatar
0
Can you give me an example?
29th May 2020, 11:57 AM
Samir_Shah
Samir_Shah - avatar
29th May 2020, 12:05 PM
Igor Kostrikin
Igor Kostrikin - avatar
0
Thanks 😁
29th May 2020, 12:30 PM
Samir_Shah
Samir_Shah - avatar