Results 1 to 4 of 4

Thread: Newbie question?

  1. #1
    Join Date
    Oct 2013

    Newbie question?

    Hi guys,

    Since today I want to start using javascript, however using tutorials I seem to have some problem immediately.

    I have made some HTML file in notepad++ and named it HTML game. Afterwards I created a JS file named myscript. Within the HTML file I placed this code:

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



    Within the JS file just this:
    alert ("Hi there");

    Now when I run the HTML file nothing is shown, when I run the JS file I only see the plain text, nothing is executed. From viewing video's I assumed that this should work. Yes javascript is enabled.. Anyone can help? I placed both files into my wamp server which I just installed. Im running from localhost.

  2. #2
    Join Date
    May 2006
    Somewhere behind your screen
    watch the quote marks

  3. #3
    Join Date
    Sep 2013
    Houston, Texas.
    Just replace this <script src="myscript".js></script> with <script src=myscript.js></script>

    I think it should work

    Reply here if not work properly.

  4. #4
    Join Date
    May 2006
    Somewhere behind your screen
    Always Quote Attribute Values

    Attribute values should always be enclosed in quotes.

    Double style quotes are the most common, but single style quotes are also allowed.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles