Home >Web Front-end >JS Tutorial >jquery code to separate date into month and day_jquery

jquery code to separate date into month and day_jquery

WBOY
WBOYOriginal
2016-05-16 18:27:151723browse
复制代码 代码如下:

function bh_LoadViewState(){
var v=$("#hBirthday").val();
if(v=="")return;
var birthday=new Date(Date.parse(v.replace(/-/g, '/')))
$("#ddlYear").val(birthday.getFullYear());
$("#ddlMonth").val(birthday.getMonth() 1);
bh_setDayCount();
$("#ddlDay").val(birthday.getDate());
}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn