Results 1 to 20 of 20
-
Javascript Tutorial Part 1 - Introduction
Introduction
Thousands of sites around the world use JavaScript but it is still not a particularly well known programming language (compared to HTML). If you have seen anything interactive on a website like a calculation, pop-up-window, some web counters and even some navigation systems then you have probably seen JavaScript.
Unfortunately, JavaScript has changed from being a language which improves web sites to a language which destroys them. This is because there are huge JavaScript sites which have thousands of scripts for download. These usually involve things which do not benefit a website at all, like status bar effects and scrolling text which do not add much to a website.
JavaScript must not be confused with Java. Java is a completely different programming language. It is usually used for text effects and games, although there are some JavaScript games around.
So why should you use JavaScript? Well, JavaScript can allow you to create new things on your website that are both dynamic and interactive, allowing you to do things like find out some information about a user (like monitor resolution and browser), check that forms have been filled in correctly, rotate images, make random text, do calculations and many other things.
In this tutorial I am assuming that you understand HTML.
-
12-07-2011 04:27 AM # ADSAdvertise here Circuit advertisement
- Join Date
- My Birthday
- Posts
- Million and counting
-
Re: Javascript Tutorial Part 1 - Introduction
What Do I Need?
You will not need any special hardware or software to write JavaScript, you can just use Notepad or any other text editor. You do not even need to have any special software on your webserver. JavaScript will run on any webserver anywhere! All you will need to do is make sure that you have at least a version 3 browser, as versions of Internet Explorer and Netscape Navigator before this do not support JavaScript, so you will not be able to see your creations.
ahmadatta2009 - ahmad polo
-
Re: Javascript Tutorial Part 1 - Introduction
Declaring JavaScript
Adding JavaScript to a web page is actually surprisingly easy! To add a JavaScript all you need to add is the following (either between the <head></head> tags or between the <body></body> tags - I will explain more about this later):
<script language="JavaScript">
JavaScript
</script>
As you can see the JavaScript is just contained in a normal HTML tag set. The next thing you must do is make sure that the older browsers ignore it. If you don't do this the code for the JavaScript will be shown which will look awful.
There are two things you must do to hide the code from older browsers and show something instead:
<script language="JavaScript">
<!--Begin Hide
JavaScript
// End Hide-->
</script>
<noscript>
HTML Code
</noscript>
As you can see this makes the code look a lot more complex, but it is really quite simple. If you look closely you can see that all that has been done is that the JavaScript is now contained in an HTML comment tag. This is so that any old browsers which do not understand <script> will just think it is an HTML comment and ignore it.
Because of this the <noscript> tag was created. This will be ignored by browsers which understand <script> but will be read by the older browsers. All you need to do is put between <noscript> and </noscript> what you want to appear if the browser does not support JavaScript. This could be an alternative feature or just a message saying it is not available. You do not have to include the tag if you don't want anything shown instead.
-
Re: Javascript Tutorial Part 1 - Introduction
Commenting
Something you might have noticed in the example above was that on the line:
// End Hide-->
There was a:
//
which does not usually appear in an HTML comment. This is because it is the sign for a JavaScript comment (it was included here to stop the browser from thinking the closing HTML tag was a piece of JavaScript).
It is very important in JavaScript, as with any other programming language t
o include comments, especially if you want others to learn from your code. It is also useful for including a copyright message.
-
Re: Javascript Tutorial Part 1 - Introduction
What Now?
Now you have learnt all about the basics of JavaScript. You know how to declare a JavaScript and how to make it backwards compatible. In the next part I will show you how to write some code to actually do something.
ahmadatta2009 - ahmad paolo
-
Re: Javascript Tutorial Part 1 - Introduction
I hope that everyone is
Has benefited from the my lesson
Greetings: ...
ahmadatta2009 - ahmad paolo
-
06-14-2012, 12:30 PM #7
MTV Regular
This user has no status.I am:----
- Join Date
- Jun 2012
- Posts
- 566
- MTV$
- -520
Re: Javascript Tutorial Part 1 - Introduction
How tough is java? Do i need to take some classes to learn it or can it be learnt on my own if i go through the materials that i have like books, internet resources etc.
-
Re: Javascript Tutorial Part 1 - Introduction
Javascript is the client side scripting language, developed by netscape, used along with HTML to build a efficient web site / webpage.
In the beginning stages, web pages were developed only using html, which are nothing but static pages. User interaction and dynamic changes are not possible with html. With the advent of scripting languages the problem was solved.
</script>
Here the attribute language defines the language used. For VBscript user it will be vbscript.
The script tag can be written anywhere inside head or body tag of html.
Ex:-
<html>
<head></head>
<body>
<script language=javascript>
//code comes here.....
//code comes here.....
//code comes here.....
</script>
</body>
</html>
First Javascript program using document.write?
Ex:-
<html>
<head></head>
<body>
<script language=javascript>
document.write("This is my first javascript program");
</script>
</body>
</html>
Ex:-
<script language=javascript>
document.write("-- <b>bold</b> <font color=red> red </font>--");
</script>
Ex:-
<script language=javascript>
document.write(" -- first line --- <br>");
document.write(" -- second line --- <br>");
</script>
in above leter you have learn basiv javascript.
-
09-14-2012, 12:04 AM #9
Banned
This user has no status.I am:----
- Join Date
- Sep 2012
- Posts
- 1,129
- MTV$
- 3,336
Re: Javascript Tutorial Part 1 - Introduction
Unfortunately, JavaScript has changed from being a language which improves web sites to a language which destroys them. This is because there are huge JavaScript sites which have thousands of scripts for download. These usually involve things which do not benefit a website at all, like status bar effects and scrolling text which do not add much to a website.
-
Re: Javascript Tutorial Part 1 - Introduction
Introduction
Thousands of sites around the world use JavaScript but it is still not a particularly well known programming language (compared to HTML). If you have seen anything interactive on a website like a calculation, pop-up-window, some web counters and even some navigation systems then you have probably seen JavaScript.
Unfortunately, JavaScript has changed from being a language which improves web sites to a language which destroys them. This is because there are huge JavaScript sites which have thousands of scripts for download. These usually involve things which do not benefit a website at all, like status bar effects and scrolling text which do not add much to a website.
JavaScript must not be confused with Java. Java is a completely different programming language. It is usually used for text effects and games, although there are some JavaScript games around.
-
05-09-2013, 03:48 AM #11
Banned
This user has no status.I am:----
- Join Date
- May 2013
- Posts
- 674
- MTV$
- 2,000
Re: Javascript Tutorial Part 1 - Introduction
they are used to provide the client side JavaScript and so many other things. they are used to not allow to read the reading files and so many other things because they are kept for security things and so many other things. there are many things such as multimedia, validation, animation, debugging.
-
05-09-2013, 03:51 AM #12
Banned
This user has no status.I am:----
- Join Date
- May 2013
- Posts
- 674
- MTV$
- 2,000
Re: Javascript Tutorial Part 1 - Introduction
there are many things such as JavaScript and many other things. they are not used for Network applications and so many other things. they are considered to be one of the most difficult thing and so many other things. they are used to provide image map, browsers, string and so many other things.
-
05-09-2013, 03:55 AM #13
Banned
This user has no status.I am:----
- Join Date
- May 2013
- Posts
- 674
- MTV$
- 2,000
Re: Javascript Tutorial Part 1 - Introduction
they are used to provide one of the multimedia, validation, animation, debugging and so many other things. they are used to know about the multithreading and so many other things. they are used to be one of the programming language and so many other things. they are used to allow the function and so on.
-
05-09-2013, 03:59 AM #14
Banned
This user has no status.I am:----
- Join Date
- May 2013
- Posts
- 674
- MTV$
- 2,000
Re: Javascript Tutorial Part 1 - Introduction
they are used to provide one of the programming language that is considered to be one of the developing in our day to day life and so many other things. they are used to know about the Notepad that is considered to be one the programming language by typing near the laptop computer.
-
05-09-2013, 04:04 AM #15
Banned
This user has no status.I am:----
- Join Date
- May 2013
- Posts
- 674
- MTV$
- 2,000
Re: Javascript Tutorial Part 1 - Introduction
they are used to know about the microsoft frontpage that is considered to be one of the popular frontpage and so many other things. they are used to provide one of the scripting language and so many other things. they are used to create and to know about them JavaScript and so many other things.
-
05-09-2013, 04:08 AM #16
Banned
This user has no status.I am:----
- Join Date
- May 2013
- Posts
- 674
- MTV$
- 2,000
Re: Javascript Tutorial Part 1 - Introduction
there are many things about variable function names is considered to be one of the JavaScript and so many other things. they are used to provide JavaScript statements and many other things. they are used to be one of the <script> that is considered to be put within the HTML page and so many other things.
-
05-09-2013, 04:53 PM #17
Banned
This user has no status.I am:----
- Join Date
- May 2013
- Posts
- 674
- MTV$
- 2,000
Re: Javascript Tutorial Part 1 - Introduction
they are used to provide that for loop. they are considered to be one of the most popular form of looping and so many other things. they are used to be one of the three important parts such as initialization, test statement, increment and so many other things. they are used to know about the loop to be true or false.
-
05-10-2013, 10:39 AM #18
Banned
This user has no status.I am:----
- Join Date
- May 2013
- Posts
- 674
- MTV$
- 2,000
Re: Javascript Tutorial Part 1 - Introduction
there are many things such as JavaScript is considered to be one of the programming language and so many other things. they are used to know about interactive like a calculation, popup window and so many other things. they are used to be one of some navigation systems to be seen JavaScript.
-
05-10-2013, 10:59 AM #19
Banned
This user has no status.I am:----
- Join Date
- May 2013
- Posts
- 674
- MTV$
- 2,000
Re: Javascript Tutorial Part 1 - Introduction
they are used to be one of the software to write JavaScript and so many other things. they are used to know about that this could be program by using Notepad and so many other things. they are used to provide that the software is considered to be one of the laptopa computer and so many other things.
-
05-10-2013, 01:02 PM #20
Banned
This user has no status.I am:----
- Join Date
- May 2013
- Posts
- 674
- MTV$
- 2,000
Re: Javascript Tutorial Part 1 - Introduction
they are used to provide that scripting language is considered to be one of the appear in an HTML comment and so many other things. they are used to be one of the sign for a JavaScript comment and many other things. they are used to provide closing HTML tag is considered to be JavaScript.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
































Reply With Quote



Bookmarks