Javascript learning, javascript
The Date function of js is very powerful. Generally used.
First obtain the current date:
Var CurDate = new Date (); var Year = CurDate. getFullYear (); // Year (four-digit example: 2014) var Month = CurDate.
JSON date to JS date, we know that after the date type is converted to JSON, the returned data looks like this:
/date (1379944571737)/
But this date does not appear directly, because no one knows what it means, and here's a way to turn the JSON
In js, we generally talk about the time difference between Greenwich Mean Time and local time, in minutes. This is no different from php and asp. Next we will combine date () function to introduce js Time Zone issues
Js time zone functions:Set
JS new Date () Get timeThe Date object is used to process dates and times.To create the syntax for a Date object:var mydate=new Date ()The Date object automatically saves the current date and time as its initial value.There are 5 parameters in the
Several common objects and their properties and how to use them:(1). Array ObjectThe Array object is used to store multiple values in a single variable.To create the syntax for an Array object:New Array ();New Array (size);New Array (Element0,
DateThe date object in JavaScript is used to process dates and times.To create the syntax for a Date object:The new date () Date object automatically saves the current date and time as its initial value.New Date ("Month dd,yyyy hh:mm:ss");New Date ("
Reprint: http://blog.csdn.net/icanlove/article/details/21989339The JS Date object is used to process the date and time.To create the syntax for a Date object:var mydate=new Date ()The Date object automatically saves the current date and time as its
The ABS method returns the absolute value of a number.
The ACOs method returns the inverse cosine of a number.
The anchor method adds an HTML anchor point with the NAME property at both ends of the object's specified text.
The Asin method returns
Several common objects and their properties and usage:(1). Array ObjectThe Array object is used to store multiple values in a single variable.To create the syntax for an Array object:New Array ();New Array (size);New Array (Element0, Element1, ...,
JavaScript is an interpretive programming language, mainly to enhance the dynamic effect of HTML pages
JavaScript is made up of three parts: ECMAScript, BOM, DOM
Single-line comment//multi-line/* */
Introduce the way to introduce
The date class
in Java.util
www.linuxaid.com.cn 01-09-20 23:03 496p everywhere
--------------------------------------------------------------------------------
in JSP, we often have to deal with the date and time information, when you can
1. Common events:AbortOnabort (When object loading is interrupted)BlurOnblur (element loses focus)ChangeOnChange (selected element changes)ClickOnClick (mouse click)DblClickOnDblClick (double left mouse button)ErrorOnError (Triggers on the Window
The code of Bitter B:
These two days to write a calendar control, tune a half-day how can not get the value of the desired, and finally found that the pit was very miserable.
Getday (): Return one day of the week, Sunday is 0, Monday is 1, Saturday
1. New Date (DATESTR): Converts a string to a Date objectParameters:
①datestr {string}: A string that can be converted to a Date object (can be omitted); There are two main types of strings:
1) yyyy/mm/dd HH:mm:ss: If the time is omitted, the time
Concat () joins the element into the array join () converts all elements of the array into strings and joins together splice () inserts, deletes, replaces the array element push () adds the element to the end of the array pop () moves the last
This article summarizes some common javascript methods for friends who are interested in the front-end. Concat () concatenates elements into an array
Join () converts all elements of the array into strings and joins them together.
Splice () insert,
1. String object functions and attributesFunction:CharAt (): returns the character at the specified position.CharCodeAt (): returns the Unicode encoding of characters at the specified position.Concat (): connection string.IndexOf (): returns a
From W3school, the first part is the get operation, the second part is the set operation.Date Object method
Method
Description
Date ()
Returns the date and time of day.
GetDate ()
Returns the
(1) Date* Date: * Introduction is the date class under the Java.util package, which is responsible for describing data such as dates. * Date mainly describes the current time millisecond value object. * Many of its methods are not conducive to
Get Date1. Date ()-Returns the date and time of the day.2, GetDate ()--Returns the day of the one month (1 ~ 31) from the Date object.3, GetDay ()--Returns the day of the week (0 ~ 6) from the Date object.4, GetMonth ()--Returns the month (0 ~ 11)
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.