输入框的样式像QQ邮箱或者163邮箱收件人那个输入框的样式一样,即输入框的高度要随着输入内容增减的高度自动增减。
在asp.net 中:
TextBox的设置如下:
1. 宽度要设置定值 不能设为百分比。
2. textMode 属性设为MultiLine,多行显示
3. Style 中的overflow设为hidden;除去自动滚动条
4. 高度height要设置为:expression(this.scrollHeight),高度自增减。
在asp.net 中:
TextBox的设置如下:
1. 宽度要设置定值 不能设为百分比。
2. textMode 属性设为MultiLine,多行显示
3. Style 中的overflow设为hidden;除去自动滚动条
4. 高度height要设置为:expression(this.scrollHeight),高度自增减。
程序结果如下图:
![](https://p-blog.csdn.net/images/p_blog_csdn_net/xuezhongsong/EntryImages/20090522/12.jpg)
![](https://p-blog.csdn.net/images/p_blog_csdn_net/xuezhongsong/EntryImages/20090522/13.jpg)