Home >Web Front-end >JS Tutorial >What are the advantages of javascript
The advantages of JavaScript are: 1. JavaScript reduces network transmission; 2. JavaScript facilitates the manipulation of HTML objects; 3. JavaScript supports distributed application computing.
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
(1) Advantages of javascript:
1.javascript reduces network transmission.
Before the emergence of user-side scripting languages such as JavaScript, traditional data submission and verification work were transmitted from the client browser to the server development through the network. If the amount of data is large, this is really an invisible waste of network and server development resources. Data verification can be performed on the client side using javascript.
2.javascript facilitates the manipulation of html objects.
Javascript can easily manipulate objects in various pages. Users can use javascript to control the appearance, status and even operation mode of each element in the page. javascript can "customize" the browser according to the user's needs, thus making The web page is more user-friendly.
3.javascript supports distributed application computing.
Javascript can enable a variety of tasks to be completed only on the user side without the involvement of network and server development, thus supporting the calculation and processing of distributed applications.
(2). Limitations of javascript:
1. Each browser manufacturer has different levels of support for javascript.
There are currently many browsers on the Internet, such as firefox, internet explorer, opera, etc., but each browser supports JavaScript to a different extent. Different browsers are browsing a website with JavaScript scripts. On the home page, due to slightly different support for JavaScript, there will be a certain gap in the effect, and sometimes it may not even be displayed.
2. "Web security" sacrifices some functions of javascript.
When one of the design goals of JavaScript is set as "web security", some functions of JavaScript need to be sacrificed. Therefore, 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 homepage where the javascript is embedded and developed. In short, javascript will only exist in its own little world - the web homepage.
[Recommended learning: js basic tutorial]
The above is the detailed content of What are the advantages of javascript. For more information, please follow other related articles on the PHP Chinese website!