+ 3

Why is my script not working?

It should make the first paragraph gone but it's not working and throwing an error i don't understand. Plz help me🥲 https://code.sololearn.com/WzwAwgcnXoYl/?ref=app

4th Feb 2022, 10:37 AM
Rishi
Rishi - avatar
4 ответов
+ 5
onload=()=>{ let div1=document.getElementById("d1"); div1.style.display="none"; }; to load, along html, Wrote in , onload=() => { //js code } otherwise it is loaded before html reader..
4th Feb 2022, 10:50 AM
Jayakrishna 🇮🇳
+ 2
Jayakrishna🇮🇳 okay so i did this, is this how we do that? https://code.sololearn.com/W3g23Tj2VEEE/?ref=app
4th Feb 2022, 1:04 PM
Rishi
Rishi - avatar
+ 1
Yes. Rishi 👍
4th Feb 2022, 1:07 PM
Jayakrishna 🇮🇳
+ 1
Jayakrishna🇮🇳 thank you very much :)
4th Feb 2022, 1:07 PM
Rishi
Rishi - avatar