I'm following tutorial cideon on JavaScript
and wrote some examples in Notepad++ and saved them as something.html. The problem is when I open it with IE or Chrome, the code between <script>
and </script>
tags doesn't run at all. What is wrong with that?
<!doctype html>
<html>
<head>
<title>Example of prompt()</title>
<script>
var user_name;
user_name = prompt("What is your name?");
document.write("welcome to my page ")
+ user_name + "!");
</script>
</head>
</html>