First, some concepts
① Traditional ajax: Interactive data format--custom string or XML description;
Cross-domain-Resolved by server-side proxy.
② today's best scenario: Use JSON format to transfer data, use JSONP to cross domains.
③json: A data
Instance 1--controls the constant movement and stopping of an objectHtml:
Copy Code code as follows:
JS: Achieve right movement
Copy Code code as follows:
var timer=null;
Window.onload=function () {
var
A method of embedding Javasript in HTML1. Place the JavaScript code directly between the tag pair 2. The
4. The same script, the function definition can appear after the function call, but if it is in two pieces of code, and the function
Introduced
Lower-level languages, such as C, have low-level memory management commands, such as malloc () and free (), which require developers to manually release memory. However, a high-level language like JavaScript is different, objects (objects,
Introduced
Lower-level languages, such as C, have low-level memory management commands, such as malloc () and free (), which require developers to manually release memory. However, a high-level language like JavaScript is different, objects
Not to mention experience, are some of the lessons.
This time someone wants to say, "Rely on, you ya half bucket of water, why teach us". Don't scold me first, listen to me first.
If you ask a college student to teach elementary school math, it's
A method of defining regular expressions
There are two ways to define a regular expression: the constructor definition and the regular expression direct quantity definition. For example:
Copy Code code as follows:
var reg1 = new
Before you introduce the text, let's say what JSON is.
JSON (JavaScript Object notation) is a lightweight data interchange format that we call JavaScript Object notation. One of the advantages of using JSON for data transfer is that JSON is
The insertion sort is efficient in the operation of data that is almost already sorted out, that is, the efficiency of linear sorting can be achieved.However, the insertion sort is generally inefficient because the insertion sort can only move data
All the code snippets that need to be used first (intercept)
Copy Code code as follows:
MenuControl.prototype.boxDisplay = false;//Whether the layer selection menu is displayed
MenuControl.prototype.controlUI;
JavaScript function is a strange thing, in contact with a period of time you will be confused, do not understand what it is. Do you get confused by the fact that there are no names for JavaScript functions, and whether the JavaScript function is
JavaScript has a lot of holes in its grammar, which is known to all.
Let's take a picture first.
The code is as follows:
Copy Code code as follows:
{} + []; 0
[] + {}; "[Object Object]"
{} + [] == [] + {}; False
({} + [] ==
One, why not use the for in statement
Jqmodal This jquery plugin is estimated that many people have used, within the Jqmodal source code, there is a function for HS, which has a nested loop as follows,
Copy Code code as follows:
for (
SetTimeout (code,millisec)//-executes code after a specified time
Code must;
Millisec must;
Cleartimeout (Settimeoutid)//-cancel settimeout ()
SetInterval (CODE,MILLISEC),//Specify looping code within the interval milliseconds
Code
Essentially, there are two ways to do this, either by creating the DOM or by using javascript:
1 through the newly created image, the test will send a aborted request, and IE6 does not support, the new image will be changed to
1.JavaScript case sensitive;
2. Declare a variable if you do not write Var, the global variable is declared; any function that is not a method is a global variable, all of which points to window;
3.% operator, to find the remainder, to retain
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.