Alert using JavaScript


/ Published in: PHP
Save to your folder(s)

message alert, javascript alert


Copy this code and paste it in your HTML
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function showAlert() {
  5. var name = "Roseindia";
  6. var city = "Delhi";
  7. alert(name +" is in "+ city);
  8. }
  9. </script>
  10. </head>
  11.  
  12.  
  13.  
  14. <body>
  15. <input type="button" value="Click for Alert" onClick="showAlert();">
  16. </body>
  17. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.