如何使用jquery字符串转换为时间 [英] how to convert string to Time using jquery
本文介绍了如何使用jquery字符串转换为时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有串这样的上午8:00
我需要把它转换成时间格式,我怎么能做到这一点使用jQuery
I have string like this "8:00 Am"
I need to convert it into time format how can i do that using jquery
推荐答案
您可以使用日期.js文件
例如
Date.parseExact("8:00 AM", "hh:mm tt");
这篇关于如何使用jquery字符串转换为时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文