|
JavaScript is a programming language that can be included on web pages to build them more interactive.
-
JavaScript generates HTML designers a programming tool.
-
JavaScript can put dynamic text into an HTML page.
-
JavaScript can respond to events.
-
JavaScript can read and write HTML elements.
-
JavaScript can be used to validate data.
-
JavaScript can be used to find the visitor's browser.
-
JavaScript can be used to make cookies.
-
Scripting
Scripting languages are often used for executing repetitive tasks. while they may be complete programming languages, they do not normally go into the depths of complex programs, such as thread and memory management. This is not easy to define. They may use another program to do the work and simply define it what to do. They often do not create their own user interfaces, and rather will rely on the other programs to create an interface for them. This is quite exact for JavaScript. The browser will also take care of the memory management and thread management, leaving JavaScript free to get on with the things it wants to do.
JavaScript vs. Java
|
|
|
- JavaScript is primarily a scripting language for use within HTML pages
|
- Java is a real programming language that does quite different things from JavaScript.
|
- JavaScript was developed by Brendan Eich, then working at Netscape, as a client side scripting language.
|
- Java is much harder to learn. It was developed by Sun for use in pretty much anything that needs some computing power.
|
|
|
|
- JavaScript is not a programming language in strict sense. Instead, it is a scripting language because it uses the browser to do the decent work.
|
- Java is a pure programming language. Used to create web pages.
|
Security
-
JavaScript cannot read or write from or to the file system on the computer. This is the security alert.
-
JavaScript cannot run any other programs. This would also be unacceptable.
-
JavaScript cannot demonstrate any connection to whatever computer, except to download a new HTML page or to send mail. This, too, would create unacceptable hazard.
-
Client–side JavaScript has expressly been developed for use in a web browser in conjunction with HTML pages. This has certain effects for security.
|