Javascript learning notes (1) JavaScript Overview

Source: Internet
Author: User

Javascript is an interpreted object-based and event-drivenProgramDesign Language. In terms of syntax composition, its core language is similar to C, C ++, and Java, but it is a weak type language, and its variables do not have to have a clear type.

Before proceeding to further research on JavaScript, You need to clarify a few theme that is very easy to misunderstand.

Javascript is not Java. Because of the Javascript name, many people think that JavaScript is a script language derived from Java, but it is not actually. JavaScript and Java have nothing to do with addition to improving the executable content for the webpage in terms of syntax and performance. However, JavaScript can be a good partner with Java for web development.

Javascript is not only executed on the client, but can also be used to write server scripts. Client Javascript is one of the most common variants of JavaScript so far. It works by a javascript interpreter embedded in a web browser. If you embed a javascript interpreter in other applications, JavaScript can run anywhere.

When a web browser is embedded with a javascript interpreter, it allows executable content to be distributed to the Internet in the form of JavaScript scripts. In addition to being able to control the content of webpages, JavaScript can also control the content of browsers and HTML forms that appear in browsers, and also control the behavior of these documents. Once you have mastered the core of the Javascript language, the key to using JavaScript effectively on a webpage is to learn the features of the Document Object Model (DOM) displayed in a browser.

Although Javascript is a powerful scripting language, client-side javascript can only be used in a limited environment, so it does not have the features required by independent languages: in addition to the ability to dynamically generate HTML documents (including images, tables, frameworks, forms, and fonts) to be displayed by the browser, JavaScript does not have any graphic processing capabilities; for security reasons, client JavaScript does not allow read/write operations on files. In addition to triggering the browser to download the documents specified by any URL and sending the HTML form content to the server script and email address, javaScript does not support any form of networking technology.

You can directly enter JavaScript operators and statements in the URL bar of your browser to test your understanding of the program. For example, enter the following statements:
Javascript: 5% 2
Javascript: x = 3; (x> 5 )? "X is less": "X is greater"
Javascript: D = new date (); typeof D;
Javascript: S = ""; for (I in Navigator) S + = I + ":" + navigator [I] + "\ n"; alert (s );
Debugging javascript can also refer to http://jslint.com which is a good tool.

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.