Page 319 - Webapplication11_C11_Flipbook
P. 319
4.4 REASON FOR CHOOSING JAVASCRIPT
HTML is capable of producing pages that are more or
less static. The view doesn’t alter much once you load Development
them up until you click a link to go to a new page. Adding of
JavaScript to your code, on the other hand, allows you Mul media
Applica ons
to alter the appearance of the page in a variety of ways,
like changing the text, changing the colours, changing the
options accessible in a drop-down list, and much more.
The majority of JavaScript operations are instantaneous. Suppliments Uses of Dynamic
Client and
In reality, JavaScript is frequently utilised to accomplish Sever Side JavaScript Page
tasks that would otherwise slow down the server, such Processing Crea on
as form validation. This work load allocation to client-side
services considerably speeds up the process.
JavaScript has various uses/applications as shown below:
Ð ÐDevelopment of Multimedia Applications: JavaScript Valida on of
User Input
can be used by the user to include multimedia elements
like images, audio, video, animations, etc. within the
web pages. You can show, hide, modify, resize, and
create picture rollovers with JavaScript. By adding scrolling text to the status bar, multimedia applications can
become more engaging.
Ð ÐDynamic Page Creation: JavaScript allows the users to change the elements of the web pages dynamically.
Ð ÐValidation of User Input: This is one of the primary applications of JavaScript, which allows users to validate input
entered into various types of fields such as textboxes.
Ð ÐSupplements Client and Sever Side Processing: JavaScript can be processed on the client side as well as the server
side.
4.5 ROLE OF JAVASCRIPT IN WEB DEVELOPMENT
HTML Language is used to create web documents or web pages. JavaScript is embedded in the HTML code. The
<script> tag informs the browser about JavaScript code in the HTML code. A complete web page can be visualized as
three separate layers which allows the designer to concentrate on a particular part and programmer can work on the
code in JavaScript application. Here is a brief description of these layers.
Structure
This is the part of the website that users see, and it consists of text, images, and links that allow the user to navigate
through the various pages or the entire website. HTML tags are used to specify the document’s structure. The browser
perceives the display as a tree-like structure.
Style
This layer describes the appearance of the document. Setting the font colour, background image, border, and alignment,
for example, all fall under this layer. These operations can be carried out utilising the page’s HTML elements or the
cascading style sheets (CSS). When we have to make modifications in multiple places on a page or pages, the former is
more difficult, whereas the same CSS can be used on thousands of pages.
Behaviour
This layer outlines the actions that the page can execute. A user can interact with a web page by pressing specific keys,
rolling or clicking the mouse, filling out forms, and so on. JavaScript makes it simple by processing events that occur on
the web page and displaying the appropriate answer.
JavaScript Part 1 317

