PS: Recently did not update the Java learning notes, because May, the lab to go to the junior, so in order to internal management system project,
Can only begin to learn javascript,dom and jquary. Take care of these three parts first. Java can only endure until midnight to learn
, the blog will first temporarily update this part of the content ...
Learning content:
1. Learn about JavaScript.
Basic Tools for 2.JavaScript development
Simple program for 3.JavaScript
Basic syntax for 4.JavaScript
1. Understanding JS
What is Javascript,javascript is a scripting language, is to achieve the Web page dynamic effect of the cornerstone, in fact, plainly, is a Web page
A dynamic interface cannot be implemented without JavaScript. In application and Web development, only learn to understand JS, to learn to understand Ajax,/jquray
/extjs wait for something ...
First we want to make clear that JavaScript and Java are two completely different concepts, JavaScript is a scripting language, and Java is a programming language,
Programming language needs to be compiled to be able to execute, and can function independently, and JS is embedded in the html,php,asp and so on,
There is no point in executing JS alone. And compared to the programming language, JS in the grammatical requirements are not particularly strict and normative.
Like the Java programming language can be compiled into binary, execution speed and efficiency is also very efficient, and Java is compiled by the JVM to run
and JS is explained by the script execution engine. execution, usually the browser ...
Development tools for 2.JS:
JS development tools are a lot of, take the simplest of all, is Notepad, in addition to Notepad and Editplus,myeclipse,dreamweaver
And so on tools ... There are many tools to develop, you can choose one of them ...
3. A simple JS program
<! DOCTYPE html>function myFunction () {document.getElementById ("Demo"). Innerhtml= "My first JavaScript Function";} </script>The above code we do not need to understand the meaning, we just need to know that the JS code must be nested in other languages in order to use
JS code can be placed in
That is, it is written directly in the HTML document, and external JS is to write the JS code into another file, and then in
The HTML document can be referenced in the ... For example:
<! DOCTYPE html>
The above code is the use of external JS, in the actual production of Web pages using external JS is actually better.
Basic syntax for 4.JS ...
Simple introduction of a few common JS methods
(1) document.write () output statement
(2) document.getElementById ("Object name") Gets the value of the element name in the form
(3) parseint () parsefloat () cast type
(4) Window.alert () pop-up tip information
(5) Window.confirm () Popup Confirmation box
(6) Window.prompt () Popup Input Prompt box
These kinds of methods are very common methods, I am here also only listed a few ... There are a lot of ways to use it.
In future notes will continue to introduce ...
JavaScript Learning Notes (i)