Abstract: The predecessor of Javascript language is called Livescript. Since Sun launched the famous Java language, Netscape has introduced...
The predecessor of Javascript language is called Livescript. Since Sun launched the famous Java language, Netscape has introduced Sun's Java programming concept, redesigned its original Livescript and renamed it Javascript.
This is why it is called Javascript because Javascript is an object-based script design language embedded in htmL documents. A large part of the syntax is similar to the Java language, and the design of Javascript can make it easy to work with the Java language. It can fully support Java applet applications, and Java applet applications can also easily access existing Javascript code. Therefore, Javascript can also be regarded as a simplified version of the Java language.
Advantages of Javascript
Before the emergence of client-side scripting language such as Javascript, the traditional data submission and verification work were carried out by the client-side browser through the network to the server. If the amount of data is large, it is an invisible waste of network and server resources.
Javascript can be used for data validation on the client side. Javascript can easily manipulate the objects of various browsers. Javascript can be used to control the appearance, status and even operation mode of the browser. The browser can be "customized" according to the needs of users, thus making the web page more friendly.
Javascript can enable multiple tasks to be completed only at the user end without the participation of network and server, thus supporting distributed computing and processing.
Limitations of Javascript
-
Javascript simplicity
-
Interpretation and implementation
-
Object-based, weakly typed (data types can be ignored.
Contrary to strongly typed definition language, a variable can be assigned values of different data types. Strong type definition language may be slightly slower than weak type definition language in speed, but the rigor brought by strong type definition language can effectively avoid many errors.
There are many browsers on the www, such as Netscape navigator, Mosaic, and hotJava, but each browser supports Javascript to a different degree. When browsing a home page with Javascript script, browsers that support and do not fully support Javascript will have a certain gap in effect, and sometimes will not even show it.
When a design goal of Javascript is set to "web security", some functions of Javascript need to be sacrificed. At this time, pure Javascript will not be able to open, read, write, and save files on the user's computer. The only information it has access to is the information in the web page it is embedded in. In short, Javascript will only exist in its own small world-the web page.