JavaScript - Popups not working -
i tried using alert() , confirm() in javascript.
<!doctype html> <html> <head> <title> website </title> </head> <body> <br/> <br/> <br/> <br/> <h2 align=center>my website</h2> <p align=center> <button onclick=“myfunction()”>click enter</button> </p> <script type=text/javascript> function myfunction() { alert(“u sure?”); } </script> </body> </html>
before point out, no, quotation marks glitch out on website. tried similar on computer , worked. computer?
the problem double quotes. “
should "
:
function myfunction() { alert("u sure?"); }
<p align=center> <button onclick="myfunction()">click enter</button> </p>
Comments
Post a Comment