Tags for this article: html, language, programming, scripts, tutorial
Scripting is used to make the web pages capable of processing the data in real time. HTML documents support client side scripting. The scripts can be developed in separate files or it can be directly embedded in HTML documents. Scripts are very necessary for a web page. Scripts invoke life into the static HTML pages. With the help of scripts HTML pages get power to process the information supplied by the user in real time and produce output for the same. HTML pages are static in nature. Scripts make them dynamic and intelligent so that they can respond to the user queries. With the help of scripts, the HTML pages can be tailored more precisely to perform special tasks. The web pages can work with different plug-ins to perform better.
By using scripts, HTML can communicate with the QuickTime browser plug-in or with the ActiveX control when displaying QuickTime-compatible content or related components in the web browser. It will let the user to control the attributes of the object being displayed such as image scaling, audio volume, auto play, looping, linking a series of movies, launching media player, opening a specified URL when the user clicks the movie etc. Various types of dynamic objects and elements can be integrated and modified in the HTML documents by writing the appropriate script. The web authors can create compelling and powerful web content once they know how to write an appropriate script. The client-side script is like a program which gets executed on the client’s machine when a web document gets loaded or when a link is activated. One of the major advantages of HTML is that it supports scripts independent of their languages. Thus, the web developer can design the scripts in the language he knows. Via scripting the web authors can extend HTML documents in highly active and interactive ways. Some of the prominent benefits of using scripts in HTML are:
1) Scripts can be run as soon as the web document is loaded to change its contents dynamically.
2) Scripts are used to process the input in the forms provided by the user. Scripts are also used to verify whether the inputs of the form are correct or not. Developers also use the scripts to automatically and dynamically fill out some data in the form according to the inputs provided by the user.
3) Scripts are often linked to the graphical objects on a web page such as buttons, check boxes, option buttons, drop down lists etc. in order to control them and optimally the Graphical User Interface (GUI).
4) To make the web page more interesting and exciting, scripts are written to influence the behavior of the scrolling, mouse cursor movements, marquee and static text and a lot of other elements.
Two types of scripts can be used by the developers. One which are executed only one time when the web page gets loaded. The other type of scripts are those which get executed every time an event occurs such as a mouse click, a scroll etc. As per the requirements, either or them or both types of scripts can be used in order to make the web page full of fun and excitement.