1. About this object
Copy Code code as follows:
View Plaincopy to Clipboardprint?
var obj1=new Object ();
var obj2=new Object ();
Add attribute p to all two objects, equal to 1 and 2 respectively
Obj1.p=1;
obj2.p=2;
Speaking directly from the method:
1, delete the node. RemoveChild ():
a
b
c
If you do not know what the parent node of the node you want to delete is? You can use the ParentNode property.
Like what:
a
b
c
2, replace the node.
1. Click event ___onclick
The event that occurs when the user clicks the mouse button. The event handler or code specified by the onclick is invoked to execute.
such as:
2. Change Event ___onchange
Occurs when the character value within the text
Objective
Replace the first argument generally places a regular expression that matches the text you want to replace, and the second argument, in general, we put in a string that replaces the text that is being matched.
In fact, the replace is far
The first step: To do a "mobile phone class"
var Mobilephone = (function () {
...
}.}) ()
Step Two: Consider this class, where the private properties of those classes are needed, and here I want to define the number of instances out of
In the presence of such a variable TT, it satisfies the following code.
After the code executes, errcount=0 and the assertion function never has alert information
The code is as follows:
Copy Code code as follows:
Magic variables in
Let's take a look at the official explanation:
Call method
Please see
Apply to: Function Object
Requirements
Version 5.5
Invokes one of the object's methods to replace the current object with another object.
Call ([thisobj[,arg1[, arg2[, [,. argn]]]]
Split definition and usage
The split () method is used to split a string into an array of strings.
Grammar
Stringobject.split (separator, howmany) parameter description
Separator required. A string or regular expression that splits the Stringobject
Today when the test found the problem, when the database in the month of 09 when the problem, with the parseint conversion after the 0. So puzzled. Measured for a long time, did not find the problem in my code, to Google search a bit, just know it
JS SetTimeout method is more useful, usually used in the page refresh, delay execution, and so on. But many JavaScript novices are still not very familiar with the usage of settimeout. Although I have studied and applied JavaScript for more than two
I like the strategy design pattern. I try to use it as much as I can. In essence, the strategy model uses delegates to decouple the algorithm classes that use them.
There are several advantages to doing so. He can prevent large conditional
Preface --speak in front
I think there are a lot of beginner friends who used to have little access to the background programming language, like me, confused a series of "nouns" in JavaScript. Seems to know what to say, but the understanding is
There are three kinds of programming errors: (1) syntax errors and (2) Run-time error (3) logic errors:syntax error:
Syntax errors, also known as parsing errors, are performed at compile time in a traditional programming language and appear in
The date of the JavaScript date.tolocaledatestring () method is converted to a string and the "date" section is returned using the conventions of the operating system's locale.Grammar
Date.tolocaledatestring ()
The following are the
The JavaScript date.setutcseconds () method specifies a date according to the universal Time set by seconds.Grammar
Date.setutcseconds (secondsvalue[, Msvalue])
Note: The data inside and outside the brackets is optional
The following
The JavaScript date.settime () method sets the time for the date object to be represented by the number of milliseconds from January 1, 1970 00:00:00 UTC.Grammar
Date.settime (TimeValue)
Note: The data inside and outside the brackets is
The JavaScript date.setdate () method sets the day of the month, at the specified date, according to the local time.Grammar
Date.setdate (Dayvalue)
The following are the details of the parameters:
Dayvalue: An integer from 1 to 31 that
Objective
The array object in JavaScript, which we often say, is primarily used to encapsulate and manage multiple data of any type.
Array objects are supported by all major browsers.
We all know that the array instance has these four methods:
One, the variable declaration promotion
Hoisting English [' hɔɪstɪŋ] us [' hɔɪstɪŋ]
N. Lifting and lifting
V. To put the ... Hang Up, rise (hoist present participle)
First look at a chestnut
var cc = ' Hello ';
function foo () {
console.
This method returns a string that indicates whether the reference string is given before or after the arrival or the same sort order.Grammar
String.localecompare (param)
The following are the details of the parameters:
PARAM:
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