如何从文本框中提取日月和年 [英] How Do I Extract Day Month And Year From Textbox

查看:106
本文介绍了如何从文本框中提取日月和年的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jQuery datepicker将日期输入文本框。如何从文本框中提取日期和年份以查找人员的年龄。如果可能的工作示例







I have used jQuery datepicker to get date into an textbox. How do i extract day month and year from textbox to find the age of the person. Working example if possible



<input type="text" class="drop_down" id="DateField" value="" placeholder="Date of Birth">


jQuery(function()
                 {
                    jQuery(#DateField).datepicker({
                        changeMonth: true,
                        changeYear: true
                    });
                });

推荐答案

提取可以使用拆分函数或子字符串的日期,月份和年份。

了解更多详细信息,您可以参考此信息,这将有助于您解决问题 http://www.datejs.com/ [ ^ ]
to extract the date , month and year you can use split function or substring.
for more details you can refer this this will help to you solve issues http://www.datejs.com/[^]


这篇关于如何从文本框中提取日月和年的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆