[1485] The basics of Javascript. (1/1)
in series: Javascript for beginners.
video tutorial by gasto
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 ...
Our authors tell us that feedback from you is a big motivator. Please take a few moments to let them know what you think of their work.
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:
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.
Thank U
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!
nice
ok
The tutorial is very easy to follow and you get alot of information in a quick time.
It is a good tutorial, i am from Peru, tnanks for your work
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
very nice. I'd like to hear more about the libraries standard and otherwise.
Thanks for a great video, very practical and easy for a beginner to understand!
Alan
Great lesson. Easy to understand.
Thanks for this wonderful illustrating video. Please, I would be so thankful if you provided more videos as soon as possible.
good beginning
Nice intro to Javascript
good tutorial
good tutorial
Very good video!
Thanks
Helpful.
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 :)
thanks for this tutorial in javascript
Enjoyed this...thanks
very cooll
Very Good!
Cool. Congratulions.
Very Good Lesson! Thanks!
VERY GOOD ! PLEASE KEEP IT UP. WE ALL NEED TO SHARE A LOT AS FAR AS IS POSSIBLE. SHARING IS GROWING. THANKS
I'm a longtime .Net programmer trying to learn web development and particularly ASP.NET development.
Thank you for sharing your knowledge.
Good intro video.
great job. simple and direct
Very Good tutorial!!
thank´s
Very good
Your video has been edited. This is an automatic post by ShowMeDo.
Good tutorial



