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

后端 未结 13 2087
后悔当初
后悔当初 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:24

    For me the problem was that I had multiple inputs with the same id. I could see the value in the field, but reading it via javascript gave an empty value because it was reading a different input with the same id - I was surprised that there was no javascript error, just could not read the values I could see in the form.

提交回复
热议问题