CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2014
    Posts
    27

    Snippets don't work

    I am beginning from zero with JavaScript. I have a couple of books on it, to help me decide if it is the right vehicle for my project. The books offer sample scripts, such as the one below. They don't say whether to insert the script in the <head> or <body> of an HTML document, so I've tried both. I have uploaded them to two different servers. But each time, nothing appears in the place where supposedly the date is expected. What part of "embedded in HTML" haven't I understood?
    Here is the entire snippet:
    <script type="text/javascript">
    document.write("Hello World. Today is " + Date() );
    </script>

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Snippets don't work

    Best that you start here...

    http://www.w3schools.com/js/
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Dec 2014
    Posts
    27

    Re: Snippets don't work

    Quote Originally Posted by PeejAvery View Post
    Best that you start here...

    http://www.w3schools.com/js/
    Thanks, PeejAvery! I've bookmarked it and will eventually inform you of my success.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured