[From jquery See Javascript]-javascript

Source: Internet
Author: User

What is JavaScript? I believe that Baidu Google can find a lot of definitions of the definition of interpretation. In my understanding, JavaScript is a client-side scripting language that handles page data logic and user experience (web effects). In fact, JavaScript is not just for clients, it can also be used for server-side programming, the typical example being Mozilla Rhino. Mozilla Rhino is a Java-only, open-source JavaScript implementation that compiles the JavaScript core syntax and does not have the ability to handle HTML objects (this is not a natural thing ...). )。 And I learned to tidy up the browser side of the scope of JavaScript, so there is no mention of the table. Students who are interested in Mozilla Rhino can click here. Similar JavaScript engines include Mozilla SpiderMonkey (C language Implementation) and Dmdscript (d language Implementation).

In terms of the browser-side JavaScript engine, it is also divided into several categories, such as Microsoft's called Jscript,netscape JavaScript (in other words, Netscape is the originator of JS-- The author is Netscape's Brendan Eich), Google's called V8 (ie, Chrome's JS engine), and Apple's WebKit. With so many engines, there are a number of different standards, which leads us to the dilemma of the current web front-end development--js not for every browser. For this reason, early in the birth of JavaScript, Netscape submitted it to the ECMA (European Association of Computer Manufacturers) for standardization, so today's JavaScript engines are basically compliant with the ECMA-262 specification. Despite their adherence to the ECMA-262 specification, each vendor has expanded and modified its own JavaScript engine. These non-standard extensions and modifications eventually led to strong integration requirements, so one after another JS library appeared, and jquery is one of them.

As mentioned earlier, JavaScript is a scripting language that does not need to be compiled on the server side, but is interpreted by the browser after it is sent to the client. Therefore, it is an explanatory language. For interpreted languages, the source code is executed on one side of the read, and when execution encounters an error, the script after the error statement is stopped. Moreover, the browser does not retain the results of the operation, so each time you open the same page, the JS on its page will be rerun (although the source files can be cached by setting the header information), this is a congenital performance problem JS. It is also important to note that when the browser interprets the HTML document, the introduction of JS is interpreted sequentially. Therefore, if there is a dependency between the introduced JS script, the statement that executes the dependent method must be followed by the implementation method statement. In addition, each browser's DOM generation order is also different, so if there is a need to execute the JS script to call the DOM object, it is best to put in the onload and other functions. For functions that are written directly on the page, you can also add the defer attribute (IE5 or FF3.5 or later) on the Introduction tab to defer execution. Also, the JS script that is written directly on the page is best enclosed in <!-and//->. This is to prevent low-version browser error interpretation code.

Before mentioning the historical background of the creation of JS function library, what exactly do these libraries do? As the name implies, they are the implementation functions that integrate a variety of common functions, and deal with the differences on each browser, through refined wisdom crystallization. Below, let's start with the JavaScript scripting language journey from the source of jquery's Library of functions!

[From jquery See Javascript]-javascript

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.