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

Categories

0 votes
138 views
in Technique[技术] by (71.8m points)

html - 多行输入<input type=“text” />(Multiple lines of input in <input type=“text” />)

I have this text input in a form:

(我有以下形式的文本输入:)

<input type="text"
       cols="40" 
       rows="5" 
       style="width:200px; height:50px;" 
       name="Text1" 
       id="Text1" 
       value="" />

I am trying to get it to take multiple lines of input.

(我试图让它接受多行输入。)

The width and height make the box to be bigger, but the user can enter text all (s)he wants yet it fills one line only.

(宽度和高度使框变大,但是用户可以输入所有想要的文本,但它只能填充一行。)

How do I make the input more like a textarea?

(如何使输入更像文本区域?)

  ask by Beginner translate from so

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

1 Answer

0 votes
by (71.8m points)

您需要使用文本区域进行多行处理。

 <textarea name="Text1" cols="40" rows="5"></textarea> 


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...