Introduction to JavaScript
JavaScript is the Internet's most popular scripting language, this language can be used for HTML and web, but also widely used for server, PC, laptop, tablet PCs and smart mobile phones and other devices.
JavaScript is a scripting language
JavaScript is a lightweight programming language.
JavaScript is a programming code can be inserted into the HTML page.
After the JavaScript into HTML pages, by all modern browsers execution.
JavaScript is easy to learn.
What you will learn
The following are the main contents of this tutorial, you will learn of.
JavaScript: Direct write HTML output stream
Examples
try it"
You can only use document.write in HTML output. If you use this method after the document is loaded, it will cover the entire document. |
JavaScript: The reaction to events
alert () function in JavaScript is not commonly used, but it is very convenient for code testing.
onclick event is just one of the many upcoming events that you learned in the tutorial.
JavaScript: changing the HTML content
To handle HTML content using JavaScript is very powerful.
Examples
try it"
You will often see document.getElementById ( "some id"). This method is defined in the HTML DOM.
DOM (D ocument O bject M odel ) ( Document Object Model) is the official W3C standard for accessing HTML elements.
In this tutorial you will learn about several chapters HTML DOM knowledge.
JavaScript: changing the HTML image
The regular meeting to dynamically change the HTML <image> source (src):
JavaScript can change most of the properties of any HTML element, not just pictures.
JavaScript: changing HTML styles
Change the style of an HTML element belonging to change variant HTML attributes.
Examples
try it"
JavaScript: input validation
JavaScript is often used to validate user input.
Did you know?
JavaScript and Java are two completely different languages, either in concept or design. Java (invented by Sun) is more complex programming languages. ECMA-262 is the official name of the JavaScript standard. JavaScript was invented by Brendan Eich. It appeared in 1995 in Netscape (the browser has stopped updating), and in 1997 by the ECMA (a Standards Association) adopted. |