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

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -