Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用JSF 2.0。无论如何在bean方法之后调用javascript函数吗?就像是
<h:commandLink oncomplete="pop()" action="#{bean.method}"/>
我试过oncomplete,但没有用。
我找到了办法。
<h:commandLink action="#{bean.method}"> <f:ajax onevent="pop"/> </h:commandLink> <script type="text/javascript"> function pop(data){ if(data.status == "success"){ .... } } </script>
可能有更好的方法,所以如果您有更好的解决方案,请随时留下您的答案!