我想在多行显示输入框信息.. [英] i want to show inputbox msg in more then one line..

查看:78
本文介绍了我想在多行显示输入框信息..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个输入文本框。我想要显示一个像rahul是班级b.tech的学生的消息。

我的文本框是打印rahul is并且阅读完全消息我正在使用箭头键。但我希望当msg更大然后输入框宽度它移动到下一行..我怎么能这样做..如果输入文本框不适合该工作。我可以使用它。

i have a input textbox. i want to show a msg like "rahul is the student of class b.tech".
my textbox is print "rahul is" and to read full msg i am using arrow key. but i want that when msg is larger then input box width it move to next line.. how can i do it.. if input textbox is not suitable for that work. what can i use for it.

推荐答案

我认为使用输入字段你不能得到这种行为。至少我以前从未见过这个。这就是为什么TextArea存在的原因。


< textarea rows =10cols =30>< / textarea>



:)
Well I think that using an input field you can't get this behavior. At least I've never seen that before. That's why TextArea exists for.

<textarea rows="10" cols="30"></textarea>

:)


自动asp.net文本框控件中的换行符 [ ^ ]

Automatic line break in asp.net textbox control[^]
Quote:

你需要设置 columns 属性文本框到你想要的最大宽度。

You need to set the columns property of the textbox to the maximum width you want.

还有一个 width 属性,它还将宽度设置为特定像素大小。

There is also a width property that will also set the width to a specific pixel size.

在任何一种情况下,您都需要通过设置 wrap 属性为 true

In either case, you need to specify that the text in the textbox should wrap by setting the wrap property to true.

<asp:TextBox ID="txt" columns="20" wrap="true" runat="server" />



否则你也可以设置属性 TextMode = 文本的多行 Box


Otherwise you can also set property TextMode="Multiline" for the TextBox.




你可以使用textarea而不是textbox。

Hi,
you can use textarea instead of textbox.
strb.Append("<textarea rows="4" cols="50" id="" text1="" style="" width="" 50px="" class="" txt="" type="" text="" name="value_""1""_txb" value="" />")





如果您觉得有用,请标记为答案。



Please mark as answer if you find useful.


这篇关于我想在多行显示输入框信息..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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