Java
script is a scripting language used to produce dynamic web pages. HTML
language which is called as web designing language produces static web pages.
Static web page is a web page that is loaded into
browser when HTML program is executed. Once web page is loaded into web
browser it displays the content with specific format and
appearance. These contents cannot be changed, their format and
appearance when they are displayed inside the web browser.
To change the content and format of it we have to
modify source HTML program and re execute the program again. This is called
the static web page.
When Java script program is executed the web page
is loaded into web browser and display some content with certain format and
appearance. The contents and their appearance is changed within the web
browser because of some time events that occur in web browser. This is called
dynamic web page.
Dynamic web page is a combination of content
formatted using html, css, discripting language and DOM(Document object
model).
JavaScript is a
dynamic computer programming language. It is lightweight and most commonly
used as a part of web pages, whose implementations allow client-side script
to interact with the user and make dynamic pages. It is an interpreted
programming language with object-oriented capabilities.
Advantages of
JavaScript
·
Less server interaction − You can validate user input
before sending the page off to the server. This saves server traffic, which
means less load on your server.
·
Immediate feedback to the visitors − They don't have
to wait for a page reload to see if they have forgotten to enter something.
·
Increased interactivity − You can create interfaces
that react when the user hovers over them with a mouse or activates them via
the keyboard.
·
Richer interfaces − You can use JavaScript to include
such items as drag-and-drop components and sliders to give a Rich Interface
to your site visitors.
Limitations of JavaScript
We cannot treat
JavaScript as a full-fledged programming language. It lacks the following
important features
·
Client-side JavaScript does not allow the reading or
writing of files. This has been kept for security reason.
·
JavaScript cannot be used for networking applications
because there is no such support available.
·
JavaScript doesn't have any multi-threading or
multiprocessor capabilities.
JavaScript can be implemented using
JavaScript statements that are placed within the HTML tags in a web page.
You can place
the
Let us take a sample example to print out
"Hello World
|