0

私はこのJSFボタンを持っています:

<h:commandButton style="position:absolute; bottom:12px; right:12%;" styleClass="lbimage" onclick="this.disabled=true" value=" Edit Account " rendered="#{not AccountProfileTabGeneralController.editable}" action="#{bean.editAccount(true)}" >
    <f:ajax render="@form" execute="@form"></f:ajax>
</h:commandButton>&nbsp;  

コード実行時のダブルクリックを防ぐために、この JS を追加しました。

onclick="this.disabled=true"

しかし、F5 キーを押して Web ページを更新すると、ページの読み込み時にボタンが無効になります。どうすればこれを防ぐことができますか?

4

1 に答える 1

0

onclick="this.disabled=true"また、使用しますoncomplete="this.disabled=false"

于 2012-11-03T15:14:19.807 に答える