如何在普通的html文本框中自动换行? [英] how to word wrap in normal html textbox?
本文介绍了如何在普通的html文本框中自动换行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个文本框
<p>Event Data :<input id="data" type="text" wrap="true" value="{{data}}"
style="width: 757px; height: 170px" />
</p>
我希望它是多行的 我不能使用asp:textbox 是否可以使用精确的文本框并将其设置为多行或
i want it to be multiline i can't use asp:textbox is it possible to use exact textbox and make it multiline or
使文本框中的文本变为自动换行
make the text in textbox go word wrap
推荐答案
这是怎么回事:
<p>Event Data:
<textarea id="data" style="width: 757px; height: 170px" rows="10" cols="80">{{data}}</textarea>
</p>
提示(和+1)到 Stewart 指出rows
和cols
是textarea
的必需属性.
Hat tip (and +1) to Stewart for pointing out that rows
and cols
are required attributes to textarea
.
这篇关于如何在普通的html文本框中自动换行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文