JSF数据表中的inputText我有JSF数据表中的javascript函数不工作,我从数据表中,但它不工作的JavaScript称为inputTextChanged()
...JavaScript事件不被解雇
<h:dataTable value="#{order.orderList}" var="o" id="table_Details" >
<h:column>
<h:inputText value="#{o.productName}" id="proname" name="proname" onchange="inputTextChanged()" />
</h:column>
<h:column>
<h:inputText value="#{o.price}" id="proprice" name="proprice" onchange="inputTextChanged()" />
</h:column>
</h:dataTable>
和JavaScript
function inputTextChanged()
{
alert ('Event Fired');
}
检查您的浏览器控制台,你看到一些错误,如*无此功能inputTextChanged *或一些其他的错误?因为你可能把功能放在错误的位置... – Daniel
@Daniel是它显示错误,像ReferenceError:inputTextChanged没有定义 – Boopathi
功能在一个js文件中的地方,并包括它,阅读更多:http://stackoverflow.com/questions/11988415/what-is-jsf-resource-library-for-and-how-should-it-be-used – Daniel