Text field does not display initial value

Well, since I am not good at css, I use the free css template and I messed up somewhere, because now the text fields do not display the initial value.

I tested a simple text field everywhere on the page, and the value is not displayed, however, when I created a new html file, linked css and created a text field, it displays the value.

Can you indicate what causes this and how can I fix it, or explain how can I override the reason for this?

+6
source share
2 answers

TEXTARES do not use the value attribute. They display what is contained between the open and close shortcuts.

eg.

<textarea name="comment">I really like this article!</textarea> 
+17
source

You can use jquery selector and val () value for init value. Just like $("[name=pageDescribe]").val("here a value");

+1
source

Source: https://habr.com/ru/post/915467/


All Articles