【问题标题】:How to determine the height of a InputTextarea of primefaces?如何确定primefaces的InputTextarea的高度?
【发布时间】:2013-12-07 11:32:03
【问题描述】:

我正在使用来自 primefaces 的带有 autoresize = "false" 的 InputTextarea 想看看如何使用 JQuery 获得高度和宽度,我已经在函数 JQuery 中处理了一些东西,但我需要知道高度和我的 inputTextarea 的宽度,我看到它的高度和宽度取决于何时调整大小。

【问题讨论】:

  • 嗨,Adan,JQuerys $(document.getElementById(<yourInputTextAreasId)).height() 不是给出文本区域的高度吗?
  • 但是如果我需要这个更新取决于什么时候调整 InputTextarea

标签: javascript jquery jsf-2 primefaces


【解决方案1】:

Resize event for textarea? 的帖子描述了如何在调整文本区域大小时获得通知。作为被调用的函数,只需使用类似

$(document.getElementById(<yourInputTextAreasId)).height()

希望对你有帮助...

【讨论】:

  • 感谢您的帮助,我已经得到了需要的数据
猜你喜欢
  • 2014-02-10
  • 2014-02-12
  • 2012-10-01
  • 2020-10-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多