HTML in the input field value

后端 未结 5 1800
醉酒成梦
醉酒成梦 2020-12-06 04:48

How can I get HTML to work in the value of the input field ? If you include HTML in the value, it appears as pure text. Is there a way to do something like this?

5条回答
  •  无人及你
    2020-12-06 05:24

    I don't think you can put HTML inside a text field and have it interpreted as HTML instead of as text in the field.

    To accomplish what you want you'll have to use CSS. An in-line example to bold the text as you cited in your example:

    
    

提交回复
热议问题