How can I automatically introduce, in a time field, the last two digits from time. What i mean is I write 16:
开发者_开发百科 in the field and it automatically puts the last 00
. Something in javascript?
thank you
- listen to the
keyup
orkeypress
event, - test if it's a
:
, - test if the two characters before the
:
are valid - add
00
精彩评论