Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am trying to add line breaks (aka newlines) to values of the input-element. 
, 
, 
 
 and aren't working; still everything is on one line.

I haven't found an answer to this question amongst other questions that solves my problem. Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
329 views
Welcome To Ask or Share your Answers For Others

1 Answer

I don't actually think you can have line breaks for those types of form elements. You may have to use a <textarea> tag which allows for literal line breaks:

<textarea id="multiliner" name="multiliner">line1
line2
line3</textarea>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...