+ 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 Answers
+ 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 šŸ‡®šŸ‡³
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