JQuery is used to obtain the birth date and gender from the ID card number.
This document analyzes how jQuery can obtain the birth date and gender from the ID card number. We will share this with you for your reference. The details are as follows:
I. Preface:
Today, in a mobile project, users can enter the date of birth according to the design draft requirements.
One, seemingly accidental things are actually inevitable to happenWhen I was in college, I turned over a very shabby book in the library, talking about biological theory, the main content is to explore the birth of life is accidental or inevitable. There are a lot of things Aristotle can not understand the formula to calculate what, as well as simulating the original Earth environment has appeared organic experiments or something. In short, the view o
if (document.form1.csrq.value== "") {
Alert ("Please fill in the date of birth!");
Document.form1.csrq.focus ();
return false;
}
if (document.form1.csrq.value== "") {
Alert ("Please fill in the date of birth!");
Document.form1.csrq.focus ();
return false;
}else{
if (document.form1.csrq.value.length!=8) {
Alert ("Date of birth must be 8 digits!") ");
Document.form
Mainly considering the case of leap years, if someone was born in 2.29, then not a leap year then 2.28 will be counted
function Age ($birth) {
$age = Array ();
$now = Date (' Ymd ');
$now = "20110228";
Decomposition current date is month day
$nowyear = (int) ($now/10000);
$nowmonth = (int) (($now% 10000)/100);
$nowday = $now% 100;
Decomposition date of
Xiaojie, a citizen, and her boyfriend Sun Hao lived together and gave birth to the next daughter. Xiao jie thought that Sun Hao would get married as long as the child was born, but Sun Hao said that Xiao jie failed to give birth to his son, so he could not get married and refused to pay for his daughter's support. Xiao jie found the xiangfang district legal aid lawyer. under the mediation of the lawyer, Sun
If (document. form1.csrq. value = ""){
Alert ("Enter the date of birth! ");
Document. form1.csrq. Focus ();
Return false;
}
If (document. form1.csrq. value = ""){
Alert ("Enter the date of birth! ");
Document. form1.csrq. Focus ();
Return false;
} Else {
If (document. form1.csrq. value. length! = 8 ){
Alert ("the birth date must be 8 digits! ");
Document. form1.c
In this paper, we analyze the method of jquery to obtain birth date and gender from the ID card number. Share to everyone for your reference, specific as follows:
First, the foreword:
Today, in the project to do the mobile end, according to the design draft requirements, is to allow users to enter their own date of birth, I am also very serious with just know the date type of the HTML5 form, I was thinkin
Data-entry friends often input a large amount of data in the form, such as ID card number, student ID number, and so on. These important data can not be wrong when inputting, otherwise the consequence is serious. So, is there any way not to make mistakes? Manual is certainly not the case, in fact, a WPS table in a function can be easily quickly input these important data.
Below we will use the WPS table to practice how to extract the date of birth in
One, seemingly accidental things are actually inevitable to happenWhen I was in college, I turned over a very shabby book in the library, talking about biological theory, the main content is to explore the birth of life is accidental or inevitable. There are a lot of things Aristotle can not understand the formula to calculate what, as well as simulating the original Earth environment has appeared organic experiments or something. In short, the view o
As the information management staff, in the data entry, sometimes need to extract the date of birth from the ID card number, if you do not want a manual entry, how to do?
No need to learn the tedious functions, not search the Web template, using the wps form, only three seconds, you can extract from the ID number of the birth date .
Next, we'll use the WPS table to practice.
First, use the WPS form (ET)
This article mainly describes
how PHP obtains gender and birth date methods from identity cards . Has a good reference value, following the PHP Chinese network small series together to see it
Please look at the code:
Gender and Birthday $birth = strlen ($idcard) ==15 by ID number? SUBSTR ($idcard, 6, 6): substr ($idcard, 6, 8); $sex = substr ($idcard, (strlen ($idcard) ==15?-2:-1), 1)% 2? ' 1 ': ' 0 '
The third part of the custom view, modeled on the personal birth date of the microblogging movement screen, looks at my chart first:
Support to set the initial year, left and right to choose the year of birth, the corresponding TextView value will also change. This animation effect for a long time, the feeling is still relatively blunt, and micro Bo that still a little different. Everybody has the improv
In the conduct of staff information statistics, often used in the name, gender, ID number and date of birth, and other different fields. This information can be a single input workload will be very large, if entered the ID number, we do not need to date of birth, the date of birth can be extracted from the ID card number, the following is the specific implementat
Problem description:
Personnel basic information ImportProgramIf the date of birth is before January 1, 1950, the system reports the following error:
An error occurred while creating basic employee information. Contact the system administrator.Sqlcode is:-20001Sqlerrm is: ORA-20001: The date of birth cannot be a future date.Analysis:After tracking, we found that the
The recent dazzle rich woman, and once the "son of the richest man" constructed, people can not help thinking of "rich second generation", think of birth and fate of the problem ~Today, sail takes you to a group of survey data: Look at the impact of birth on the fate of how much!Analysis tools: Data Report FinereportData source: Xiaoxiang Morning News and Tai Xiang Network Joint investigation, sample data 3
Example 1 The code is as follows:Copy code Function getAge ($ birthday ){$ Age = 0;$ Year = $ month = $ day = 0;If (is_array ($ birthday )){Extract ($ birthday );} Else {If (strpos ($ birthday ,'-')! = False ){List ($ year, $ month, $ day) = explode ('-', $ birthday );$ Day = substr ($ day, 0, 2); // get the first two chars in case of '2017-11-03 12:12:00'}}$ Age = date ('Y')-$ year;If (date ('M') Return $ age;} Example 2 The code is as follows:Copy
1. First use the WPS form to open the electronic form containing the ID card number;
2, click Enter the date of birth cell, click FX or perform Insert function
3, in the "Common Formula" tab select "ID card Birthday", click the input box to the right of the "ID number" below "Parameter input", click the cell where the ID number is located, or enter the name of the cell that contains the ID number, click Insert Formula, and a date of
This example describes how Python gets the age based on the date of birth. Share to everyone for your reference. Specific as follows:
This code can get its age based on the user's date of birth, the born parameter is a date type
Def Calculate_age (born): Today = Date.today () Try: birthday = born.replace (year=today.year) except valueerror:# Raised when birth
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.