Ask coding questions

← Back to all posts
add event listiner HELP
chloenguyen122

can someone help me my ADDEVENTLISTINER Is not working.. how do I fix this error?

Comments
hotnewtop
xfinnbar

Add the defer attribute to the Script tag, move it to the head. Also, your content (such as your button) should go in the body.

chloenguyen122

@xfinnbar hey thank you, do you mind writing out the code for me and what line to put it... I am super confused also new to code and getting a bit discouraged, but thank you so much for your help

xfinnbar

@chloenguyen122

chloenguyen122

@xfinnbar THANK YOI