Guest User

Untitled

a guest
Aug 10th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. Alert Messages in Javascript
  2. <script language="javascript" type="text/javascript">
  3. alert('This is what an alert message looks like.');
  4. </script>
  5.  
  6. function showAlert() {
  7. var country = "Fiji";
  8. var city = "Suva";
  9. alert('The city of ' + city + ' is located in ' + country + '.');
  10. }
  11.  
  12. <input type="button" value="Click Here" onClick="showAlert();">
Add Comment
Please, Sign In to add comment