找到你要的答案

Q:p:commandButton onclick function not invoked in Internet Explorer

Q:P:命令按钮onclick函数不调用Internet Explorer

<p:commandButton id="changepwd" value="Change Password" type="button"
  onclick="changepwdPanel.show()" update="dialog,messages" appendToBody="true" />

This button displays a <p:dialog>. It works fine in Firefox and Chrome, but not in Internet Explorer.

How is this caused and how can I solve it?

<p:commandButton id="changepwd" value="Change Password" type="button"
  onclick="changepwdPanel.show()" update="dialog,messages" appendToBody="true" />

这个按钮会显示一个& lt;P:对话框& gt;。它的工作原理在Firefox和Chrome,但不是在Internet Explorer。

这是怎么造成的,我该怎么解决呢?

answer1: 回答1:

Try using:

<f:facet name="first">
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
</f:facet>

in <h:head>, I had similar issue and it worked for me.

尝试使用:

<f:facet name="first">
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
</f:facet>

in <h:head>, I had similar issue and it worked for me.

internet-explorer  jsf  primefaces  onclick