Academic Tutorials



English | French | Portugese | German | Italian
Google

Home Source Codes E-Books Downloads Contact Us About Us

JavaScript Tutorial
JavaScript Introduction
JavaScript How To
JavaScript Where To
JavaScript Variables
JavaScript If...Else Statement
JavaScript Switch Statement
JavaScript Operator
JavaScript Popup-boxes
JavaScript Function
JavaScript For-Loop
JavaScript While-loops
JavaScript Break Loops
JavaScript For..In Statement
JavaScript Event
JavaScript Try-Catch Statement
JavaScript Throw Statement
JavaScript Onerror
JavaScript Spacial Characters
JavaScript Guideline
JavaScript String
JavaScript Date Object
JavaScript Array
JavaScript Boolean Object
JavaScript Math Object
JavaScript HTML DOM Object
JavaScript Browser Detection
JavaScript Cookies
JavaScript Validation
JavaScript Animation
JavaScript Image Maps
JavaScript Timing Event
JavaScript Create Object
JavaScript Summary

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


Introduction to JavaScript
Previous Next

Introduction To JavaScript

There are no 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 pop-up-window calculation, some web counters and even some navigation systems then you have probably seen JavaScript.

JavaScript has changed from being a language which develops web sites to a language which destroys them. This is because there are severa JavaScript websites which have thousands of scripts for download. These are generally 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 it is not Java. Java is a completely different programming language to Java Script. It is generaly used for text effects and games, although there are some JavaScript games around.

So why would you use or learn JavaScript? JavaScript can allow you to create new things on your website that are both dynamic and interactive, allow us to do things like find out some information about a user check that forms have been filled in correctly, rotate images, make random text, do calculations and many other things.

In this tutorial we are assuming that you understand HTML.If you don't know HTML go to our HTML section.


What is JavaScript?

JavaScript (also called JScript) is a scripting language with the primary aim of giving life to our web pages.It is very powerful, flexible, and easy to learn.

JavaScript is: An interpreted language.This means that the code is executed straight away by an interpreter, which is built into web browsers, some web servers and Antechinus JavaScript Editor. JavaScript is sometimes used instead of VBScript for customizing applications.

An object-Oriente based language. You can create your new objects in JavaScript (or use the predefined ones), but not by inheriting from existing objects like fully-fledged object-oriented languages (C#, C++ or Java).

Not Java. Although JavaScript resembles languages like Java, C and C++, it is a language of its own.

Loosely typed. Languages like C# or C++ require that you declare the data type of the variables you are using. JavaScript does not. Most functions (for example, alert() ) will happily accept variables of different types and if needed convert them on the fly from one type to another.

Meant for "client-side" scripting. When visitors come to your web pages spiced with JavaScript, the code will executes on their machines. By comparison, PHP code will executes on the web server ("server-side" scripting) to output the HTML code, which is then fed to visitor's web browsers.




Your First JavaSscript Code Example


<html>
 <body>
   <script type="text/javascript">
     <!--
     document.write("Vyom Technosoft!")
      //-->
   </script>
 </body>
</html>

Output

  Vyom Technosoft!

Our first steps tell to the browser we were using a script with <script> tag. Next we set the type of scripts equal to "text/javascript", which you may notice that doing this is similar to the way you specify in CSS, which is "text/css".

Next we added an optional HTML comment that surrounds our Javascript code. If a browser do not support Java Script, then it will not display our code in plain text to the user! The comment was ended with a "//-->" because "//" signifies a comment in Javascript, so we add that to prevent a browser from reading the end of the HTML comment in as a piece of Javascript code.




Javascript document.write

The final step of our script was to use a function that was called document.write which writes a string into our HTML document. document.write can be used to write text, HTML, or a little of both. We passed the famous string of text to the function to spell out "Vyom Technosoft!" which was printed to the screen.

Do not worry if you do not completely understand how document.write works, as we will be discussing functions in a later section of the our Academic Tutorial.




Script

Looking at our Java Script above code given, mark that there is no semicolon (;) at the end of the statement "document.write(Vyom Technosoft!)". Why? Because Javascript does not require that you use semicolons(;) to signify the end of each statement.

If you are well experienced programmer and prefer to use semicolons, feel free to do so. Javascript will not malfunction from ending semicolons. The only time where it is necessary to use a semicolon is when you choose to smash or add two statements onto one line(i.e. two document.write statements on one line).



Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previous Next

Keywords:javascript download, free javascript, javascript tutorial, enable javascript, turn javascript on, javascript codes, javascript array, javascript menu, javascript window.open, download javascript free


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
AJAX Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PHP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
XML Web Services Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.