Just as we can write in this form:
Copy Code code as follows:
function Hello () {
Alert ("Hello");
}
Hello ();
var Hello = function () {
Alert ("Hello");
}
Hello ();
are actually the same.
But when we make
Only one form of code type is a function.
Undefined: Undefined, we can also call it non-existent, typeof (undefined) =undefined.
Null: null. Undefined is non-existent, and Null is present, but none. typeof (null) =object, but null is not object,
Offsettop can get the position of the HTML element distance above or the outer element, Style.top is also OK, the difference is:
One, offsettop return is a number, and Style.top returns a string, in addition to the number of units: px.
Second,
Test
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Relatively simple to delete the data in the array operation, more detailed can refer to
Http://www.jb51.net/article/21505.htm
the difference between JavaScript and Java 1.JavaScript is a product of Netscape, and Java is a sun company product.2.JavaScript is object-based and Java is object-oriented.3.JavaScript can be performed only with explanation, Java needs to be
This method converts a date to a string using a universal Time contract.Grammar
Date.toutcstring ()
The following are the details of the parameters:
NA
return value:
Returns the conversion date to a string, using a generic time
The method returns a Date object in the human-readable form of the time part.Grammar
Date.totimestring ()
The following are the details of the parameters:
NA
return value:
Returns the time portion of a human-readable form of a Date
The JavaScript date.setyear () method specifies the year according to the common time setting.Grammar
Date.setyear (Yearvalue)
Note: The data in parentheses is optional
The following are the details of the parameters:
Yearvalue: An
The JavaScript date.setutcmilliseconds () method specifies a date in milliseconds that are set by the common time.Grammar
Date.setutcmilliseconds (Millisecondsvalue)
Note: The data inside and outside the brackets is optional
The following
The JavaScript date.setseconds () method specifies a date according to the set seconds of the local time.Grammar
Date.setseconds (secondsvalue[, Msvalue])
Note: The data inside and outside the brackets is optional
The following are
The JavaScript date.setminutes () method is set to a specified date according to the setting minutes of the local timeGrammar
Date.setminutes (minutesvalue[, secondsvalue[, Msvalue])
Note: the appearance and data in parentheses are
The JavaScript date.setmilliseconds () method sets the millisecond of the specified date by local time.Grammar
Date.setmilliseconds (Millisecondsvalue)
Note: The parameters in parentheses are optional
Millisecondsvalue: A number between 0
The year that is returned by the JavaScript Date.getutcfullyear () method at the specified date, according to the Universal Time. The value returned via getUTCFullYear is an absolute number that is consistent with the 2000, for example, 2008
hasOwnProperty method
Returns a Boolean value that indicates whether an object has a property of the specified name.
Object.hasownproperty (Proname)
Compatible winie5.5+, macie-, nn6+, moz+, safari-
Parameters
Object
Required option. An
Well, let's make it step-by-step, first let's take a look at the original wording of the inheritance:
Copy Code code as follows:
We see, in fact, that the root of inheritance lies in this step programmer.prototype=new person
The code is as follows:
Copy Code code as follows:
But we can't reuse this object, how do we take this object as a prototype?
First of all, it is impossible to have a construction method on a JSON object, so let's do a
Let's look at a piece of code like this:
Copy Code code as follows:
A very simple piece of code, let's see what this new one does. We can split the new process into three steps:
var p={}; In other words, initialize an
First we go on to the code above, and we'll extend this code:
Copy Code code as follows:
The result popped false. In other words, the methods of the two objects are different methods. So we know that in C #, each object
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