Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 13:50

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Beginner]Javascript Tutorial Part 2

Discussion on [Beginner]Javascript Tutorial Part 2 within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
[I]Inquisitor's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 62
Received Thanks: 4
[Beginner]Javascript Tutorial Part 2

Hello, welcome to the second tutorial part 2 beginners for javascript.

Well i will show you more to work on variables

PHP Code:
<script type="text/javascript"// Don't forget hehe..
</script> // End of the script 
How to work with variables....

Ok between the script type and script end starts the text you know that already...

Now every variable starts with var for example

var name

You created the variable called "name"
Ok, and in the var name you should put this so always when you use this variable to show text

var name="Your text here";

Congulrations... you created variable called name with the text "Your text here" now you can use it anytime. Here is example.....

PHP Code:
var name="Your text here"// The text and variable called NAME you can change it anytime..
document.write(name); // This is your variable called name and always when you write (name) in text box or alert the current text from the variable will be there.. 
Working with alert boxes

To write alertbox its simple you don't need variables, strings etc..

alert("Your text here"); // Always when someone open this website, there will pop up alert window just like error and will show your text there..

Working with more variables and count them..

var name(1+1);
alert(name); // There will be 2 because in the variable it counts 1+1 and in the alert box shows the answer..


PHP Code:
var num1=100// This is number 100 on variable 1 just like the text
var num2=200// This is number 200 just on variable like normal text
var answer=(num1+num2); // This count the variable num1 and num2 together
document.write(answer); // We have the variable answer there, the variables are counted together and in the document will be 300 ! 100+200=300. 
That's all for now, i hope you enjoyed please thanks if you like this tutorial i will make more useful tutorials and parts 3 4 5 6 7 8 9 .etc only if you support me and write nice comments..
[I]Inquisitor is offline  
Reply


Similar Threads Similar Threads
[CG] 3D Studio Max Beginner Tutorial I
03/29/2013 - Artist Tutorials - 23 Replies
Habe mal vor einiger Zeit ein Video Tutorial zu 3D Studio Max gemacht. Es werden die Basic vom Interface und im Modelling gezeigt. Von einer Box bis zu einem Schwert. Es ist der erste Teil einer Serie von Tutorials. Die Inhalte sind wie folgt geplannt: Einfürhung in das 3D Studio Max Interface.
[Beginner]Javascript Tutorial Part 1
03/01/2012 - Web Development - 4 Replies
Hello Elite Pvpers, now i will teach you how to work with javascript. This tutorial is only for beginners there would be more parts... Everytime when you want to add javscript code on your html website you must have <script type="text/javscript"> </script> Thosse 2 script types. Otherwise nothing is going to work, always when you want write some code, write it down the <script type>. The javascript its not same like HTML or PHP you can't just write your text and done. The syntax is...
[Beginner Tutorial] AutoIt3 Simple Process Closer
01/24/2008 - Tutorials - 0 Replies
Hello all, I was editing my script with comments for no real reson because I was bored and decided to comment every single part of the script so I can remember how everything works if I ever somehow lost my memory :D thus I decided I should upload my script to ElitePvpers because they're my 1 and only favorite forum that I ever use and maybe I can possibly help some AutoIt3 Noobies somehow with my little program. Why I Made This I use this everyday because I have to turn off my...
[DOWN] Beginner Tutorial
05/07/2006 - Artist Tutorials - 7 Replies
Dieses Tutorial ist ausschliesslich für absolute Anfänger geeignet ! Für etwas Fortgeschrittenere GFX'er ist dieses Tutorial wohl überflüssig, aber dennoch evt. ganz nett zu lesen. Leider zu groß um es zu posten und mein FTP ist im Eimer... Wenn ihn jemand hosten könnte, wär ich demjenigen sehr verbunden. ^^ http://rapidshare.de/files/17748583/tutobs...bsce ne.jpg.html Naja... ich bitte um Bewertungen + Karma Ups ^^
[Ryzom] Beginner Tutorial
04/28/2004 - General Gaming Discussion - 0 Replies
© Tribal Beginners Guide Hallo zusammen Ich habe mir mal die Mühe gemacht und alle relevanten Informationen zusammengesammelt bzw. teilweise selbst erstellt. Ich werde den hieraus resultierten Beginners Guide regelmäßig updaten/erweitern. Zu finden sein wird er dann auf der Seite von Tarius http://www.ryzom-game.info.de. Zur Zeit steht er dort natürlich noch im Betaforum!!! Solltet Ihr inhaltliche Fehler finden oder Ergänzungen/Erweiterungen haben könnt Ihr sie mir gerne per Mail...



All times are GMT +1. The time now is 13:51.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.