+ 1
javascript . Code not working after F5. help!
<!DOCTYPE html> <html> <head> <meta name="viewpoint" content="width=device-width, initial-scale=1.0"> </head> <body> <h1> My First JavaScript</h1> <p id="demo"> JavaScript can change the style of an HTML element </p> <script> function myFunction() { document.getElementById("demo").style.fontSize="25px"; document.getElementById("demo").style.color="red"; documet.getElementById("demo").style.backgroundColor="yellow"; } </script> <button type="button" onclick="myfunction()">Click Me!</button> </body> </html>
4 Answers
0
myFunction should be myfunction
+ 1
Document spelling is wrong.
0
Okay thanks. Corrected but still no changes
0
Thanks Abhay! It worked