更新时间:2021-09-08 02:26:59
你可以这样:
<h:inputText id="propertyId" value="#{myBean.property}" style="display:none"/>
并像这样访问它(请注意,如果它在表单内部,您可能需要添加表单前缀)
and access it like this (note that if its inside a form you might need to add the form prefix)
alert($('#propertyId').val()); // or alert($('#myFormId\\:propertyId').val());