Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the main purpose of javascript?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what the main purpose of javascript is to solve, and it has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article.

The main purpose of javascript is to solve the speed problem left by the server-side language and to provide customers with a smoother browsing effect. At that time, the server needed to verify the data, and because the speed of the network was very slow, the verification steps wasted too much time, so Netscape developed Javascript to provide the basic functions of data verification.

The operating environment of this tutorial: windows7 system, javascript1.8.5 version, Dell G3 computer.

Javascript is a case-sensitive client scripting language for object-oriented dynamic types, which is developed from Netscape's LiveScript. The main purpose is to solve the speed problem left over by server-side languages, such as Perl, and to provide customers with smoother browsing results.

At that time, the server needs to verify the data, because the speed of the network is very slow, only 28.8kbps, the verification step wastes too much time. So Navigator, the browser of Netscape, joined Javascript to provide the basic functions of data validation.

The background of JavaScript's birth

In the 1990s, web programs in Europe and the United States are becoming more and more popular, but at that time, users are still using telephone dial-up Internet access, through the modem, the network speed is only 28kb/s. However, the presentation of web programs is becoming more and more abundant. In the days when there was no JavaScript, operations such as form validation were performed on the server side.

For example, the user goes to a registration page, fills in the user name, password, personal information, and clicks to register. OK, it's a big deal.

Send the message, start the network transmission, wait for more than ten seconds, the server receives the message from the browser client, starts processing, and then returns the processing information to the client browser. The user suddenly finds that the user name is prompted to start with an uppercase letter, modify it, and click to register.

Then repeat the previous step, and finally prompt that the password is too short and not secure enough. Just a simple registration page can spend a lot of time and bandwidth on form validation. This is unbearable for users.

In this context, there is an urgent need for a client-side language to solve these problems. Netscape, which was at the forefront of technology at the time, began to develop a client-side scripting language.

1995 Brandon, who works for Netscape. Aiqi developed a scripting language called LiveScript in Netscape browser 2.0. in order to catch up with the media frenzy about Java, it was renamed JavaScript. From then on, JavaScript was born.

JavaScript standardization

People are afraid of famous pigs and strong. As soon as JavaScript was launched, it aroused widespread concern in the society, and different versions of JavaScript language came out one after another. At that time, the more popular ones were: JavaScript in Netscape Navigator 3.0, JScript in IE and ScriptEase in CEnvi. For programmers, if you want to develop a user-friendly web program, maybe compatibility is a lot of work, after all, some users use different browsers and embedded scripting languages. The standardization of JavaScript is highlighted.

In 1997, sun, Microsoft, and some other scientists and programmers sat together for a meeting and formulated the ECMA-262 standard to standardize ECMAScript. Since then, major browser vendors have taken ECMAScript as the basis for JavaScript implementation.

The composition of JavaScript

JavaScript consists of ECMAScript, BOM and DOM, in which ECMAScript is the core of JavaScript and defines the basic languages of JavaScript, such as variables, types, keywords, functions and so on. DOM is the document operation object and the interface to manipulate HTML,XML elements; BOM is the browser object, which can access and manipulate the browser window.

Only ECMAScriptd standards are defined in the ECMA262 standard, for DOM. There is no standard for BOM, and BOM,DOM belongs to the host object.

The so-called host is the environment in which JavaScript runs, such as the browser you see now. Different browsers have slightly different host objects, so the most painful compatibility problems facing the front end are mainly caused by BOM and DOM.

What can JS do?

JavaScript can be used in various areas of Web development, such as:

Web application development: the web pages we browse in our daily life are made up of HTML, CSS and JavaScript. Through JavaScript, we can update the style of the elements in the web page in real time, and realize the interaction between people and the web page (such as monitoring whether the user clicked the mouse or pressed a button, etc.), and can also add some cool animation to the web page.

Mobile application development: in addition to Web application development, JavaScript can also be used to develop applications on mobile phones or tablets, and we can also use some excellent frameworks (such as React Native) to make development easier

Web games: the Mini Game that we have played on the web page can be implemented using JavaScript

Back-end Web application development: in the past, we all used JavaScript to develop the front-end part of Web applications, but with the emergence of Node.JS (a JavaScript runtime environment), JavaScript can also be used to develop the back-end part of Web applications.

Thank you for reading this article carefully. I hope the article "what is the main purpose of javascript to solve" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report