Verify the validity of the ID card number based on the encoding rules. The specific implementation is as follows. You can refer to the following code to verify the validity of the ID card number based on the ID card number encoding rules.
The
1.Date objects
Create
var date1 = new Date ();var date2 = new Date (12983798123);//fill in a millisecond value, it should be from January 1, 1970 ..... How many milliseconds
Method
1.new date () Get local
//An extension to date that converts date to a string of the specified format//the Month (m), Day (d), hour (h), Minute (m), second (s), quarter (q) can be used with 1-2 placeholders,//year (Y) can use 1-4 placeholders, milliseconds (S) with only 1
// Determine whether it is a date
// Note: you cannot accurately determine the date of January 1, February in a leap year. js must be used for additional processing.
Function isdate (STR){VaR patt =/^ ([1-9]) | (0 [1-9]) | (1 [012]) [-. /] (0? /D) |
I recently wrote a small calendar space. Put it up and save it.
Below is the js source code:
// JavaScript Document Calendar. js
Function Calendar (){ This. lan_columns = new Array ("day", "one", "two", "three", "four", "five", "Six "); This.
1. Convert string to date
Date. parse ()
You can set
Date. tostring ()And
The string returned by date. toutcstring () is converted to the date type.2. convert a date object to a specified format string (simulate Java API and use the same
JS age Calculation Method Based on birthday
This article describes how to calculate the age of JavaScript Based on the birthday. Share it with you for your reference. The specific implementation method is as follows:
?
1 2 3 4 5 6 7 8 9
Js method for obtaining the first seven days of the current date
This article mainly introduces how to obtain the first seven days of the current date by js, involving the for statement and date operation techniques in javascript. for more
Kettle variables and examples of custom java code, kettlejava1 kettle. properties parameter configuration data source connection and FTP connection
The configuration of the database connection FTP in the test environment and production environment
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.
Summary of Javascript time operations and summary of javascript operations
Source: http://www.ido321.com/847.html
A timer is required for the project. The effect is as follows:
Js Code
1:/* Get the current time */
2: function getCurrentDate()
Share a js function toDate, jstodate that converts a string in the specified date format into a date.
Today, we found that the datetimebox of easyui could not display the date normally, and then we naturally realized the toDate function. After
Get started with Comet and the simplest Java Demo, cometjavademo
How can I receive new messages when I browse the Web page? The HTTP Protocol cannot be used by the server to send messages to the client.
1. Weibo and Forum posts. What should I do if
Compile Chrome extension in JavaScript to implement interaction with the browser and time notification. javascriptchrome
Interaction with browsers1. bookmarksUse the chrome. bookmarks module to create, organize, and manage bookmarks. You can also
// Obtain the string length to distinguish between Chinese and English characters. prototype. getbytes = function () {var Carr = This. match (/[^ \ x00-\ xFF]/ig); return this. length + (CARR = NULL? 0: Carr. length);} // specifies the length of the
For example, setcookies ("cookiesname", value, "1 H") // Save the value to cookiesname for one hour. This function is relatively simple. Please refer to the source code. Function setcookie (a, B) {var d = new date (); var v = arguments; var c =
The date object is used to process the date and time.Syntax for creating a date object:VaR mydate = new date ()The date object automatically saves the current date and time as its initial value.The following five parameters are supported:
New date
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
/*
** Format the time object;
*/
Date. Prototype. Format
=
Function
(Format ){
/*
* Eg: format = "yyyy-mm-dd hh: mm: SS
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.