Nowadays, popular in Web pages using a lot of JavaScript, we need to find ways to optimize them, make them faster. We use event delegates to make event listeners more efficient, use frequency reduction techniques to limit how many methods are used,
The Boolean object is similar to the Boolean package class in Java, and it has two values: True and False
1. Create a Boolean object
Copy Code code as follows:
var boo = new Boolean ()//The Boo is not assigned at this time, but its
Forms such as:
Copy Code code as follows:
Varoeditor=fckeditorapi.getinstance (' content ');
Varcontent=oeditor.getxhtml (TRUE);
*************************************************
Using JavaScript to fetch and set FCKeditor
Javascript OOP design Pattern Object-oriented programming
When we first wrote the JS code, it was written like this.
function CheckName () {
//verify name
}
function Checkemail () {
//verify mailbox
}
function
1, the conversion between the object and the basic type:
The object is not empty at any time, and is true in a Boolean environment.
As
New Boolean (FALSE);
New number (0);
New String ("");
New Array ();
Although the internal value is false, the
The history history object in JavaScript contains information about the URL that the user has browsed, referring to the browsing history of the browser as a historical object. Given the need for security, the object receives a lot of restrictions
Today is the final section of our JS Introductory series demo (which I planned for the time being), but please friends remember, the previous example you are very familiar with the words does not mean that we understand JS, and even we have to admit
Direct volume syntax
/pattern/attributes
To create the syntax for a RegExp object:
Copy Code code as follows:
var obj=new RegExp (pattern,attributes);
Case 1:
Copy Code code as follows:
var pattern=/a/;
Brief introduction
One of the most common JavaScript libraries today is Requirejs. Every project I've been involved in recently has been used for Requirejs, or I've recommended adding requirejs to them. In this article, I'll describe what Requirejs
4.1 String Direct Quantity
1. String Direct Quantity
。 can be 0 or more.
。 The string must be written on the same line. Too long with + number
。 Used to define start and end double quotes and single quotes must match
2. Escape characters in a string
This article introduces the JavaScript implementation Picture Carousel Component, the nonsense does not say more directly to look below:
Effect:
Automatically loop the picture, there is a button below to switch to the corresponding picture.
Objective
For JavaScript, classes are optional (not necessarily) design patterns, and implementing classes in [[Prototype]] languages like JavaScript is lame.
This kind of lame feeling is not just from grammar, although grammar is a very important
Objective
We call these acts events, and response callbacks (callbacks). A continuous flow of events is called the event stream (a stream of events). The speed at which these actions occur is not something we can control manually. But we can
At the end of the semester, tutorial information security Introduction homework. Just encounter the classical cryptography algorithm Playfair algorithm and hill algorithm, using JavaScript language to achieve is in the fun, while Baidu Edge code, by
JS composition
As we all know, javascript there are three components ECMAScript , DOM and, BOM depending on the host (browser), the specific manifestations are not the same, IE and other browser styles are different.
1. DOM is the standard
One, settimeout those things of the single thread
All along, everyone is saying that JavaScript is single-threaded, and that browsers are running JavaScript programs whenever and only one thread.
However, do not know that there is no
JS through the script label default load is synchronized, that is, the first script inside the completion of the JS loading, and then began to load the second, and so on, until all JS files loaded complete. And JS dependency must be in the order of
In a typical object-oriented language, such as Java, there are classes (class) concepts, classes are templates of objects, objects are instances of classes. But in the JavaScript language system, there is no concept of class, JavaScript is not based
Here I briefly talk about the coding problems that are often encountered in front-end HTML and JavaScript daily work.
In a computer, the information we store is expressed in binary code. We know, the on-screen display of English, Chinese characters
For example, a detailed resume information page 1, personal Data 2, work experience 3, project experience 4, other information 4 forms.
The general requirement is to allow the user to submit any one of the forms to the next page for modification
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.