Issue
Sometimes input
elements are visually presenting their values however these values are not presented in the element HTML. Not as "text" and not as "value" attributes. Like here
Actually, it's a value
attribute, but it is hidden.
I mean even existence of value
attribute itself is hidden.
I'd like to understand why those value
attributes are hidden ?
Solution
In case of text type input elements (and some others as well), in native HTML value
attribute of the element presents its default value.
The text value inserted by the user is not presented there, so only the default value will always presented in value
attribute.
In case no default value is set for that element, the value
attribute will not be presented in the element HTML.
Similarly to the presented in the attached screenshot.
Answered By - Prophet
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.