JavaScript Learning notes-1

Source: Internet
Author: User

It's embarrassing to say that I've been doing it for eight years, but I've never learned to learn JavaScript from the basics, and I've been thinking about how much the connection with Java is.
I'm really ashamed of myself. It's time to start today and I'm going to lay the groundwork.

What are the features of JavaScript?
JavaScript makes Web pages more interactive. JavaScript simplifies the regular repetition of HTML segments, reducing download time. JavaScript responds to the user's actions in a timely manner, checking the submission form for immediate inspection without wasting time handing over the CGI
Verify. JavaScript is characterized by endless, as long as you are creative.
What is the difference between Java and JavaScript
A lot of people see Java and JavaScript have "Java" four words, think they are the same thing, even my own at the same. In fact, they are two completely different kinds of things. Java, the full name should be Java
Applets are small programs that are embedded in a Web page and have their own separate running Windows. Java applets are pre-compiled and an Applet file (. Class) is Notepad
Open reading, simply cannot understand. Java applets are powerful, with access to protocols such as HTTP, FTP, and even viruses on your computer (precedent already). JavaScript, by contrast, is less capable. Javascript
is a "script", which directly writes the code to an HTML document, which is compiled and executed when the browser reads it, so you can view the HTML
Source files to view JavaScript source code. JavaScript does not have a separate running window, and the browser's current window is its running window. They're the same point I think only the same with Java
As a programming language.

Note about inserting JS in HTML: If you want to insert in the page that declares the frame (frames page), you must insert it before <frameset>, otherwise it will not run.

NaN "not a number". This is a rare value to be seen, so that we can ignore it. The "NaN" value is returned when the operation cannot return the correct value. NaN
The value is very special because it is "not a number", so any number is not equal to it, even Nan itself is not equal to Nan.

Think of a low-level error that I have made, if (i+1%2==1) {//Here never come in, because the operator's priority is wrong, low-level miss}

As for the syntax if else while the for break continue and so on, and so on, the language is the same, but more linguistics, or more easily confused.

JavaScript Learning notes-1

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.