-
August 5th, 2016, 05:10 PM
#1
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>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|