


js code to get date of birth and gender through ID number_javascript skills
// ID card verification and get birthday code
< script language="javascript">
function showBirthday(val)
{
var birthdayValue;
if(15==val.length)
{ //15-digit ID number
birthdayValue = val.charAt(6) val.charAt(7);
if(parseInt(birthdayValue)<10)
{
birthdayValue = '20' birthdayValue;
}
else
{
birthdayValue = '19' birthdayValue;
}
birthdayValue=birthdayValue '-' val.charAt(8) val.charAt(9) '-' val.charAt(10) val.charAt(11);
if(parseInt(val.charAt(14)/2)*2!=val.charAt(14))
document.all.sex.value='Male';
else
document.all.sex.value='female';
document.all.birthday.value=birthdayValue;
}
if(18==val.length)
{ //18-digit ID number
birthdayValue=val.charAt(6) val.charAt(7) val.charAt(8) val.charAt(9) '-' val.charAt(10) val.charAt( 11) '-' val.charAt(12) val.charAt(13);
if(parseInt(val.charAt(16)/2)*2!=val.charAt(16))
document. all.sex.value='male';
else
document.all.sex.value='female';
if(val.charAt(17)!=IDCard(val))
{
document.all.idCard.style.backgroundColor='#ffc8c8';
}
else
{
document.all.idCard.style.backgroundColor='white';
}
document.all.birthday.value=birthdayValue;
}
}

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In a MySQL database, gender fields can usually be stored using the ENUM type. ENUM is an enumeration type that allows us to select one as the value of a field from a set of predefined values. ENUM is a good choice when representing a fixed and limited option like gender. Let's look at a specific code example: Suppose we have a table called "users" that contains user information, including gender. Now we want to create a field for gender, we can design the table structure like this: CRE

On the Xiaohongshu platform, users can show their personality by changing their username, changing their avatar, etc. Many users often encounter the problem of how to modify gender settings when trying to adjust their account information. 1. How to change the gender of Xiaohongshu account? On the Xiaohongshu platform, if users want to change their gender, they need to do so in the settings of their personal homepage. The specific steps are as follows: 1. Open the Xiaohongshu App, click the "My" button in the lower right corner to enter the personal homepage. 2. At the bottom of the personal homepage, click the "Settings" button to enter the account settings page. 3. On the account settings page, find the "Gender" column. After clicking, three options will appear: male, female, and other. 4. Select the gender you want to change, confirm and save the settings. If you're having trouble changing your gender, you can

The ID number is an important symbol for the identification of residents in our country, and it can be used for identity verification on many occasions. In the application, in order to ensure the validity and accuracy of the ID number, it needs to be verified by regular expressions. This article will introduce how to use PHP regular expressions to verify the validity and gender of the ID number. 1. The composition and rules of the ID card number The ID card number consists of 18 digits or 17 digits plus a 1-digit check code. Among them, the first 17 digits represent the ID card holder’s information, and the last 1 digit represents the verification code, which is used to verify the ID card.

Many studies have found that AI is so shy that it has learned to discriminate against people. How can this be done? Recently, a study by Tsinghua University and Fudan University gave suggestions for this: If you want to drag AI back from the road of gender discrimination, a scolding will not be effective. The best way is to understand why the child is like this, and then give him the right treatment and reason. Because if you just teach without being reasonable and correct violently, the AI will be frightened into stupidity (performance will decrease)! Oh my God, it’s difficult to raise a four-legged gold-eating beast. Is it so difficult to raise a (xun) cyber child? Let’s take a look at what suggestions this group of AI “nurses and dads” have for child training. To be fair, AI can reduce gender discrimination. Before this time, it was not that no one was grabbing the ears of AI that had made mistakes and wanted it to change.

When registering for KM, we will be asked to fill in some personal information, including gender information. Users can set their gender information according to their own needs. In the edit page of the profile, users can easily find the gender option and select the corresponding gender to complete the settings. Setting gender information will help Kmi better recommend relevant content to users. So below, the editor of this site will bring you this tutorial on how to set gender for Kmi. Players who don’t know yet come and follow this article. Have a read! How can I change my gender? 1. Open the Kmi app and click on the avatar icon of the profile in the upper left corner to enter. 2. In the personal information, click the gender option to enter. 3. Select the target gender option below to set gender information.

Generally, the ENUM type can be used to define the data type of gender field in MySQL. The ENUM type can limit the value of a field to a specified list of values, thus ensuring that only predefined values can be stored. The following is a sample code that demonstrates how to define a table containing gender information in MySQL and set the data type of the gender field to the ENUM type: --Create a table containing gender information CREATETABLEuser(idINTPRIMAR

Properly storing gender information in MySQL is a common problem in database design and management. Gender information is often a simple piece of information, but how it is stored is critical to the accuracy and validity of the data. This article will introduce how to properly store gender information in MySQL and give specific code examples. Common ways to store gender information In MySQL, common ways to store gender information include using strings and integers. The advantages and disadvantages of these two methods as well as sample code will be introduced below. use string

For application scenarios that require verification of ID numbers, it is a common practice to use regular expressions to determine whether the input is legal. Golang provides the regexp package, which can be used to perform regular expression matching operations. This article will introduce how to use regular expressions in golang to verify whether the input ID number is legal. 1. ID card number rules The ID card number consists of 18 digits and a check code. The specific format is as follows: Digits 1~2: Indicates the province, represented by the statistical code designated by the National Bureau of Statistics;
