Input value doesn't display. How is that possible?

后端 未结 13 2079
后悔当初
后悔当初 2021-02-04 23:54

This must be something utterly stupid that I\'ve done or am doing, but I have an input with a value attribute that simply isn\'t being displayed:

13条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-05 00:20

    For Googler's who may have the same issue: This can happen if you have a non-numeric value in a number type input field.

    For example:

    
    

    This will show nothing even though Dev tools says the value is there, since the extra space after ?> makes it non-numeric. Simply remove the extra space.

提交回复
热议问题