Name:
[3253] gasto
Member:
67 months
Authored:
41 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 ...
The basics of Javascript. [ID:1485] (1/1)
in series: Javascript for beginners.
video tutorial by gasto, added 06/09
Name:
[3253] gasto
Member:
67 months
Authored:
41 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.
<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>
Got any questions?
Get answers in the ShowMeDo Learners Google Group.
Video statistics:
- Video's rank shown in the most popular listing
- Video plays: 6199 (since July 30th)
- Plays in last week: 16
- Published: 48 months ago
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.
All comments excluding tick-boxed quick-comments
Nice video!
Thank you very much for the video
nice tutorial!
extra , please more for beginers
Não rodou no meu IE
It's great.Thanks!
though the author don't seem to be a native English he has done a great job. looking forward to more of this
Its good but i needed lectures on more complex type of javascript.Looking for your help sir.
In your tutorial if u could display & explain the java script code and show the output HTML file at the same time by placing them next to one another it would be a great help at following your explanation.
Also when it comes to this javascript programming stuff I really need as many examples ranging from beginner to advanced. For now its the beginner level. See Datapig technologies website for a little insight.
Overall thanks for doing this!
great tutorial, perfect for a beginner like moi
If I could understand all that was going on, this probably was very well done. I am sure, that my lack of knowledge in C++/Python programming is the reason why I am lost.
I am going to continue to replay this and other sites that I have found so that I will start to gain better understanding.
Thanks
clear explanation. Thanks.
Nice intro tutorial.
I was looking for an intro to javascript example for our students. This was great.
Thanks
Thanks very much, this was perfect for my level of noobness.
Good video. Simple, shows the basics, I will see more of his videos later.
That is really very good tutorial....
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
