开发者

Automatic introduce the last part of a time field

开发者 https://www.devze.com 2023-04-01 15:41 出处:网络
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

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


  1. listen to the keyup or keypress event,
  2. test if it's a :,
  3. test if the two characters before the : are valid
  4. add 00
0

精彩评论

暂无评论...
验证码 换一张
取 消