Name: [3253] gasto
Member: 27 months
Authored: 38 videos
Description: C/C++ and python programmer. Some knowledge of graphic design too. Interested in Game Artificial Intelligence and Artificial Life. Currently studying(by myself)too many things to be worth the mention. Happy to contribute to the 'help-without-compensation-asked' community. I hope every one that r ...

[1485] The basics of Javascript. (1/1)

in series: Javascript for beginners.

video tutorial by gasto

(Showmedo is undergoing major changes. To report any problems viewing the videos please email us and include browser and OS specifics. Cheers - Kyran.)

In this video I show the basics of Javascript.

The <script> tag begins in between the <head> tag. It could also be in between the <body> tag. That is why we call the message() function from within the onload attribute in the <body> tag (That is, when the page loads).

outputing simple text on the html page and alert boxes, defining a function and an if/else clause, gives us an immediate and general feel of what Javascript is.

I left some statements without the recommended ending semicolon, just to prove it can be done (Although we shouldn't in real programs!)

Note that Javascript has no relation to Java. It was a smart 'marketing' move from Netscape (when Java was in vouge) to attract developers.

Observe That I missed some semi-colons (;) on certain Javascript statements, that is legal, but highly discouraged. Left it as-is to show that no errors are detected by Mozilla FireFox.

Notepad++ will be our editor of choice for these tutorials.

Video Tutorials related by tag:

web_development tags tag script javascript html head default_script body beginner basic attribute

Got any questions?

Get answers in the ShowMeDo Learners Google Group.

Video statistics:

  • Video's rank shown in the most popular listing
  • Video plays: 446 (since July 30th)
  • Plays in last week: 8
  • Published: 8 months ago
<html>
<head>
<script type="text/javascript">
function message()
{
	alert("Great! First javascript experimentation!");
}
var aNumber;
aNumber = 26
// comments are very useful, syntax is just like C !
document.write("<h1>The main subject here</h1>");
document.write("<p>Normal paragraph starts here.</p>");
document.write("I am ", aNumber, " years old.")
/* Other type of comments.
Multiple line comments, also ignored by the interpreter!*/
var date = new Date();
var time = date.getHours();
if(time<10){
  document.write("<p><b>You are early at: </b></p>", time, "<b>AM </b>");
  }
else{
  document.write("<p><b>Good day!</b></p>")
  }

</script>
</head>
<body onload="message()">

</body>
</html>

Thank-yous, questions and comments

If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?

You may also want to see our ShowMeDo Google Group to speak to our active users and authors.

Please provide your email address (won't be published)

Thank U


32. anonymous Wed, 02 Dec 2009 23:06

Awesome intro covering most of the basics with some "Intermediate to Advanced" coverage. Nice delivery and sweet intro to basic Spanish.

Good work -- keep it up!


31. anonymous Wed, 25 Nov 2009 08:45

nice


30. anonymous Wed, 25 Nov 2009 07:34

ok


29. anonymous Sun, 22 Nov 2009 05:26

The tutorial is very easy to follow and you get alot of information in a quick time.


28. anonymous Wed, 18 Nov 2009 14:13

It is a good tutorial, i am from Peru, tnanks for your work


27. anonymous Sat, 14 Nov 2009 09:02

The first time he runs in, why does it say "I'm 10 years old" when he typed in 26?? The second time he runs it it displays the 26....weird


26. anonymous Sun, 08 Nov 2009 17:47

very nice. I'd like to hear more about the libraries standard and otherwise.


25. anonymous Sun, 08 Nov 2009 12:24

Thanks for a great video, very practical and easy for a beginner to understand!

Alan


24. anonymous Tue, 03 Nov 2009 12:05

Great lesson. Easy to understand.


23. anonymous Tue, 06 Oct 2009 16:07

Thanks for this wonderful illustrating video. Please, I would be so thankful if you provided more videos as soon as possible.


22. anonymous Fri, 25 Sep 2009 22:13

good beginning


21. anonymous Sun, 20 Sep 2009 00:22

Nice intro to Javascript


20. anonymous Wed, 16 Sep 2009 17:37

good tutorial


19. anonymous Wed, 16 Sep 2009 17:36

good tutorial


18. anonymous Mon, 14 Sep 2009 11:14

Very good video!

Thanks


16. anonymous Wed, 26 Aug 2009 22:12

Good intro. I'm a programmer myself but have never gotten into javascript. (Too many other things to learn). Now I must make the effort :)


15. anonymous Mon, 24 Aug 2009 22:49

thanks for this tutorial in javascript


14. anonymous Sun, 09 Aug 2009 05:09

Enjoyed this...thanks


13. anonymous Thu, 06 Aug 2009 05:50

very cooll


12. anonymous Wed, 05 Aug 2009 19:53

Very Good!


11. anonymous Wed, 05 Aug 2009 07:42

Cool. Congratulions.


10. anonymous Mon, 03 Aug 2009 11:36

Very Good Lesson! Thanks!


9. anonymous Sun, 26 Jul 2009 07:52

VERY GOOD ! PLEASE KEEP IT UP. WE ALL NEED TO SHARE A LOT AS FAR AS IS POSSIBLE. SHARING IS GROWING. THANKS


8. anonymous Fri, 24 Jul 2009 10:31

I'm a longtime .Net programmer trying to learn web development and particularly ASP.NET development.


7. anonymous Fri, 24 Jul 2009 09:41

Thank you for sharing your knowledge.


6. anonymous Fri, 24 Jul 2009 08:43

Good intro video.


5. anonymous Thu, 23 Jul 2009 16:28

great job. simple and direct


4. anonymous Wed, 22 Jul 2009 20:41

Very Good tutorial!!

thank´s


Your video has been edited. This is an automatic post by ShowMeDo.


Good tutorial


Kudos and Thanks for gasto

Learn Python the easy way!
If you want to learn the Python programming language from a very gentle start or are looking to increase your ability to do cool things with Python, check out our club
View this series as a one-page learning-path
This feature is for club members. Click here to find out more.
Your email address will not be published.

Show some quick comments >>








By the Same Author

gasto This series of videos will guide you through a painless tutorial on the C programming lan [...]
Marius Meinert and Ian Ozsvald and Lucas Holland and Dai and gasto See great applications in action. We're gathering examples of really nice applications - [...]
gasto Esta serie de vídeos deberían de guiar al usuario a usar Blender desde el inicio. Blender [...]
gasto Tips and tricks for screencasting effectively.
gasto Python Terminology (bite-sized chunks). Is a series of videos that show specific terminol [...]
gasto This series should explain the main changes happening from CPython 2.x to CPython 3.0
gasto In these series I aim to show the tools GIMP has, and start from the beginning creating e [...]
gasto This series of videos is a very basic approach to python programming for beginners. In th [...]
gasto In these series, I plan on discussing the various ways of teaching out-of-the-box and hav [...]