HTML/Javascript Confusion -


i have extremely basic html document written following:

<html> <head> <title>a basic javascript game</title> </head> <body> <script language="javascript" src="mygame.js"> </script> </body> </html> 

i've created according javascript file, have made sure it's syntax alright. first line of mygame.js file is:

var persontotalkto = prompt("you wake 1 saturday morning. holidays started, , can't wait tell family you've decided of go on vacation! talk to: wife, son, or daughter?").touppercase(); 

but when open html file, i'm not getting prompt whatsoever. have javascript enabled, problem?

change script tag either html4 version:

<script type="text/javascript" src="mygame.js"></script> 

or html5

<script src="mygame.js"></script> 

(either work on browser released millennium.)


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -