Java Script Application for web
Today's websites have to work far beyond HTML, the need is felt that the
user browsing a website should be allowed to interact with that
website. The website should have a provision that the user Can accept
input and the content of web pages can be found and displayed according
to the user's requirement, this requirement can be as simple as the
color of a favorite background and can be as complex as making the text
attractive in a particular way.
Nowadays users like to see such websites which are interesting for them,
hence the content of webpages should also be dynamically changeable
according to the wishes of the user, for this, it is necessary to create
a website development environment that creates such webpages. These web
pages which have the ability to interact with the user will accept
input from the user and display the webpages prepared immediately with
content and presentation according to that report. The website should
also have the capability that in the absence of any user input Display
default web pages according to pre-defined lists and formats.
To do this in websites, it is necessary to adopt a coding technique that
can accept and process client or user requests, this processing should
result in standard HTML code because the browser program that displays
webpages on the client's computer They understand the command of HTML
itself. Accepting user requests is traditionally done by Forms, so there
should be a facility to create forms in a website preparation
environment.
When a form accepts a user's input, then it must have technology in
place that can send that input or information back to the web server for
processing. So a programming language like JavaScript is required.
JavaScript is put in the middle of an HTML program because it uses files
with the .html extension and the http protocol to navigate from the web
server to the client's browser program.
You can use JavaScript to do the following tasks or create objects in Web Pages.
Creating HTML Code Dynamically
Pop up box
Mouse rollover effect
Menu
Change the status bar text
Generating various effects by cut and paste actions with available scripts
Create drop down menu
Advantages of JavaScript
Using JavaScript instead of any other programming language gives us the following benefits.
JavaScript is an interpreted programming language. It does not have to
be compiled. This makes it easy to create programs and its grammar is
interpreted entirely by the browser itself as HTML tags do.
JavaScript does not require any special or separate editor for writing
programs. It can be written in any text editor such as Notepad. It can
be protected with the HTML tag as well as the .html extension part then
the JavaScript commands. Can be read and interpreted by any browser.
JavaScript has a very small number of commands and its grammar is very
simple so it can be easily learned and full programs can be created.
It does not require time spent compilation so scripts can be prepared in
less time. It is very suitable for small programs, such programs can be
rapidly created in JavaScript and can be included in web pages.
JavaScript programs can be written in such a way that HTML files are
completely compact and small. This minimizes the memory requirement on
the web server and can be easily downloaded for the client, in addition
JavaScript is also included in the HTML document for a web page so there
is no need to go to the network separately.
Like all programming languages in JavaScript, Conditional checking,
looping, and branching have all the features available, so using this
can be used to generate such capabilities in Webpage.
JavaScript object and event based programming facilitates such as -
clicking a button, moving the mouse on an object or removing it etc.
Therefore such programs can be written easily in it besides displaying
informational messages in the status bar below can be done.
Being a interpretable language, programs written in JavaScript can be
easily checked and mistakes can be detected. Apart from this, the
browser reports the fault of each line with its number, so it is very
easy to find and correct the mistakes in it.
JavaScript is a programming language that does not depend on hardware at
all. Any computer that can run the Browser program can also run
programs with JavaScript, it can be anywhere in the computer network,
this prevents the program writer from writing programs separately for
each type of computer.
Difference between JavaScript and Java
Due to the similarity between the names of JavaScript and Java, one
should not assume that they are similar though both have some
similarities but in fact there is a lot of difference between the two,
both being based on C ++, their grammar and control structures are
almost the same. But still there are many differences among them which
are as follows-
JavaScript
1 It is an interrupted programming language.
2 It is an object based scripting language.
3 JavaScript code is run on the browser only because JavaScript is developed for the browser only.
4 JavaScript requires less memory so it is used in web pages
5 JavaScript file has file extension ".js"
Java
1 It is a compiled programming language
2 It is an object based programming language.
3 Java applications can run in any virtual machine (JVM) or browser.
4 Java programs use more memory
5 The Java program has the file extension ".Java"
JavaScript is an object based scripting language that has been developed
according to C ++. Java has also been developed according to C ++ and
that is why Java and JavaScript often look alike and both are By mistake
one is only understood when you learn JavaScript. You also learn to
write some amount of code in Java and C ++ but in reality both Java and
JavaScript are different. Java is a fully-fledged object-oriented
programming language.
The same JavaScript is only an object based language. It is not only
useful as an independent language but is more useful as a support
language of other languages like HTML or C ++. In fact it is used as a
language handling images, Forms etc. Objects in web designing and hence
This is called object based language.
Requirement for JavaScript
To
work in JavaScript, you only need a text editor such as Notepad and
JavaScript capable browser programs such as Netscape Navigator or
Internet Explorer. No other special browser is required to display, so
using JavaScript is a very simple task.
To
write a program successfully in JavaScript, you must have a working
knowledge of HTML. If told clearly, you should have knowledge of the
following.
Moving from HTML editor to Web Browser means switching.
Understanding the difference between HEAD section and BODY section of a web page.
Creating a hyperlink to any other web page and website in the web page.
Change the background color of a web page.
Creating HTML Form objects like Command button, Text box, Radio Button etc.
0 Comments