【问题标题】:rich placeholder can't input text as in placeholder丰富的占位符无法像占位符那样输入文本
【发布时间】:2014-10-17 11:38:48
【问题描述】:

这是 rich:placeholder 中的错误吗?

<h:inputText id="input">
    <rich:placeholder value="Type text here..." />
</h:inputText>    

当我尝试输入与占位符相同的文本时,它会消失。

http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=placeholder

输入输入文本占位符建议“在此处输入文本...” - 当离开输入并再次聚焦时它会消失。 任何其他符号都会保留。

有什么解决办法吗?

【问题讨论】:

  • 实现的限制,为什么需要输入占位符值?
  • 好的。我明白这一点。将使用类似 value="ex. Type text here..." /> 之类的东西

标签: jsf richfaces placeholder


【解决方案1】:

使用类似:&lt;rich:placeholder value="ex. Type text here..." /&gt;

或者不要使用占位符。

【讨论】:

    猜你喜欢
    • 2017-04-07
    • 2013-01-15
    • 2013-09-02
    • 1970-01-01
    • 2014-01-04
    • 2017-05-11
    • 1970-01-01
    • 2019-01-27
    • 1970-01-01
    相关资源
    最近更新 更多