Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1894478
  • 博文数量: 606
  • 博客积分: 9991
  • 博客等级: 中将
  • 技术积分: 5725
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-17 19:07
文章分类

全部博文(606)

文章存档

2011年(10)

2010年(67)

2009年(155)

2008年(386)

分类:

2008-08-25 17:32:06

要设置textarea文本域的滚动条是否开启,使用style.overflow-x属性来控制。如:如果要隐藏该文本域的横向滚动条,在style属性中增加overflow-x属性控制,如下:

相应的,若要隐藏纵向滚动条:

如果使用代码控制的话,可能需要如下代码实现:
document.all("txtComments").style.overflowX="hidden";

overflow-x,overflow-y的可取值为:visible(默认取值),hidden,auto,scroll。具体解释参加如下文档(摘自MSDN帮助文档):
visible (Default)- Content is not clipped and scroll bars are not added. Elements are clipped to the size of the containing window or frame.
scroll -Content is clipped and scroll bars are added, even if the content does not exceed the dimensions of the object.
hidden Content that exceeds the dimensions of the object is not shown.
auto Content is clipped and scrolling is added only when necessary

阅读(2629) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~