Three characteristics of object-oriented language: inheritance, polymorphism, encapsulation, these three points although JavaScript does not provide a natural syntax implementation, but we can all through the prototype and other techniques to
2d-position allows you to move an object that is absolutely positioned by dragging.The position attribute of the AbsolutePosition setting element is "absolute" (absolute).BackColor Sets or gets the background color of the currently selected
1. Previously written is always a decentralized function, what function to write what function, feel not tidy, so this time to write the package of classes, used to be good, but the transfer parameters encountered a lot of problems, so, a lot of
1. Case sensitive
2. Weakly typed variables
All variables are marked with the VAR keyword, and the JavaScript interpreter automatically assigns
3. The end part of the sentence is optional
such as : Var name=23; or var name=23 can be
JavaScript Delete Example
Copy Code code as follows:
var flower={};
Flower.name= "OOP";
Delete Flower.name; True
alert (flower.name); Undefined
Create an object named Flower
Flower has member name, value "OOP";
Delete
Form Instances
This is a form of strength. Here is a small problem: because my server is not supported now, the form cannot be submitted. I will print out your input and return a false so that the form is not submitted.
OnSubmit's code does two
This method returns the cosine of a number. The cosine method returns the value between 1 and 1, which represents the cosine of the angle.Grammar
Math.Cos (x);
The following are the details of the parameters:
X: a number.
This method returns the inverse tangent of its parameter quotient. The ATAN2 method returns the value between the angle theta of the-pi and Pi (x,y) points.Grammar
Math.atan2 (x, y);
The following are the details of the parameters:
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.sethours () method sets the hour at the specified date according to the local time.Grammar
Date.sethours (hoursvalue[, minutesvalue[,
secondsvalue[, Msvalue]])
Note: The parameters in parentheses
The JavaScript date.setfullyear () method specifies the date of the year according to the local time.Grammar
Date.setfullyear (yearvalue[, monthvalue[, Dayvalue])
Note: The parameters in parentheses are optional
The following are the
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
The JavaScript date.getutcseconds () method returns the second of the specified date according to the Universal Time. The value returned by getUTCSeconds is an integer between 59 and 0.Grammar
Date.getutcseconds ()
The following are the
Document.title//Set document title equivalent to HTML title tag
Document.bgcolor//Set page background color
Document.fgcolor//Set foreground colors (text color)
Document.linkcolor//not-clicked link color
Document.alinkcolor//Activate the color of
RegExp classThe RegExp object's constructor can take one or two argumentsThe first parameter describes the pattern string that needs to be matched, and if there is a second argument, this parameter makes an extra processing instruction.first, the
DOM Basics-Creating tables
The use of JS to dynamically create a table has two formats, appendchild () and InsertRow, InsertCell (). But the first one is likely to have problems with IE, so it is recommended to use the second type.
1, InsertRow
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Copy Code code as follows:
How fast you're going to be Array.prototype.sort
var a=[4,723,3,5,67,32,4,43,34,545,43,43,,234,7,367,7,87,23,6,7
The RegExp object in JavaScript is used for regular expression-related operations, and this object provides a method test to determine whether a string satisfies a pattern. The return value is True/false.
Today I came across a question:
Objective
This article summarizes seven ways to exchange A and B variable values
var a = 123;
var B = 456;
Exchange Variable Value scheme one
The easiest way to do this is to use a temporary variable, but it's too low to use a
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.