< input type =“text”中的多行输入/> [英] Multiple lines of input in <input type="text" />

查看:295
本文介绍了< input type =“text”中的多行输入/>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



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

我试图让它取得多行输入。宽度和高度使框变大,但用户可以输入他想要的全部文本,但它只填充一行。



如何让输入更像是一个textarea?

解决方案

您需要使用textarea才能获得多行处理。



< textarea name =Text1cols =40rows =5>< / textarea>

$ b

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?

解决方案

You need to use a textarea to get multiline handling.

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

这篇关于&lt; input type =“text”中的多行输入/&GT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆