date selector
/**
* Return date
* @ Param d the delimiter
* @ Param p the pattern of your date
* @ Author xinge (modify)
*/
String. Prototype. todate = function (X, p ){
If (x = NULL) x = "-";
If (P = NULL) P = "ymd ";
VaR A = This. Split (X
JS determines whether the time format is valid [Post 11:12:14] 1 short time, such as (13:04:06)
Function Istime (STR)
{
VaR A = Str. Match (/^ (\ D {1, 2 })(:)? (\ D {1, 2}) \ 2 (\ D {1, 2}) $ /);
If (A = NULL) {alert ('input parameter is not in the
Below are some common JS methods used in the work, which are summarized to facilitate future Viewing:
// General method for closing a browser window without a closed prompt boxFunction closewin (){Window. Opener = NULL;// Window. Opener = top;Window.
Http://rayidea.net/article.asp? Id = 65
1. Regular FunctionsCommon javascript Functions include the following nine functions:(1)Alert Functions: A warning dialog box is displayed, including an OK button.(2)Confirm Function: A confirmation dialog box
-- Interaction between various parts of the chrome plug-in
The basic knowledge of the Chrome plug-in is not much to mention. You can get Started with any Getting Started tutorial. For example, the Overview and Getting Started tutorials provided by
JS verification function call method and note:
1. Set onsubmit = "return test ()" for the form and submit it with .
2. // call function verification directly when you press the mouse
3. // pass in your own value for verification, test (this) //
The simplest regular expression is:/d {4}-/d {2}-/d {2}However, the actual situation is not that simple. You should consider the validity and leap years .....
The effective range of dates varies in different application scenarios. The valid range of
1. Two ways to get the current time:
Import Datetime,timenow = Time.strftime ("%y-%m-%d%h:%m:%s") Print Nownow = Datetime.datetime.now () print now
2. Get the last day of the month minus 1 days on the first day of the month
Last = Datetime.date
This article mainly introduces how to calculate the age of javascript Based on the birthday, and related techniques related to javascript operation time, which is very simple and practical, for more information, see the examples in this article.
This article mainly sorts out the JS Date processing function, which is a small summary of my recent javascript study. Here I will share it with you to get the Date.
1. Date ()
-- Returns the date and time of the current day.
2. getDate ()
--
1. Calculate the birth date, age, and gender (18 digits) based on the ID card number)Copy codeThe Code is as follows:// Obtain the input ID numberVar UUserCard = $ ("# UUserCard"). val ();// Obtain the Date of birth// UUserCard. substring (6, 10) + "
This article mainly introduces a complete PHP time instance, involving PHP's acquisition and comparison of date, time, week, and other operating skills, which is very simple and practical, for more information about PHP time, see the example in this
This article is intended to solve the problem of real-time display time of php + js, mainly because I had a problem with my understanding at the time. maybe you have the same situation as me, let's take a look at this
Prior to writing a software for the lab's punch-in reminders, one of the important features is to remind the night before the shutdown whether the clock has been clocked. I was in wm_endsession. A modal dialog box is shown to remind you that the
This article mainly introduces how to implement the FormatDate function output in the time format in javascript, and how to implement the function of inputting the format of the date and time content like the fmt tag. it is a very practical
Here, we recommend a commonly used javascript function encapsulated by you. basically, common operations are included. if you need it, take it directly. These are all common functions, so there will be no more nonsense here. let's take a look.
Code:
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.