仅验证asp.net中的时间,例如14:30 [英] validating only time in asp.net e,g 14:30
本文介绍了仅验证asp.net中的时间,例如14:30的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我必须验证时间,例如14:60,它应该给出错误消息,指示分钟数不应大于59.
谢谢你
mohd wasif
Hi All,
I have to validate time as for e.g 14:60 it should give error message that minutes should not be greater than 59 .
thanking you
mohd wasif
推荐答案
看看这个
使用Javascript进行时间验证 [
Look at this
Time validation using Javascript[^]
在thatraja链接旁边,如果您喜欢使用jQuery,请 jQuery UI Date + Time pikcer [
Beside thatraja link, if you are comfortable working with jQuery, then jQuery UI Date + Time pikcer[^] quite good.
Note: Benefit of this,
1. You shouldn''t have to validate the time input. jQuery will take care of it.
2. It''s has may options.Like setting default time, getting current time,...
如果您使用的是AJAX,则可以使用MaskedEdit [
If you are using AJAX you can use MaskedEdit[^]
这篇关于仅验证asp.net中的时间,例如14:30的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文