如何在html5中24小时形成时间 [英] how to formatehour in 24h in html5

查看:448
本文介绍了如何在html5中24小时形成时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hellow,



如何在html5中24小时合成小时?



谢谢

解决方案

HTML5只是标记语言,JavaScript将是你的答案。使用大写 H (不是小 h )来获取24小时格式的小时数。



 mDate.format(  H //   24h格式 

< br $> b $ b

阅读此博文 [ ^ ]了解有关JavaScript日期时间格式的更多信息。


Hellow,

how to formate hour in 24h in html5 please ?

Thanks

解决方案

HTML5 is just the markup language, JavaScript will be your case of answer. Use capital H (not the small h) to get the hours in 24 hour format.

mDate.format("H") // 24h format



Read this blog post[^] for more on date time formatting in JavaScript.


这篇关于如何在html5中24小时形成时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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