如何在用戶點擊時禁用commandbutton(ajaxbutton)?jsf commandbutton setenabled onclick
onclick="javascript:this.disabled='true';"
和
onclick="document.getElementById('buttonid').disabled='true'"
但沒有任何工程:
我有嘗試過嗎?
如何在用戶點擊時禁用commandbutton(ajaxbutton)?jsf commandbutton setenabled onclick
onclick="javascript:this.disabled='true';"
和
onclick="document.getElementById('buttonid').disabled='true'"
但沒有任何工程:
我有嘗試過嗎?
爲了您的具體問題,我認爲你需要刪除圍繞「真」的報價。 但也看看這個鏈接How can I disable an h:commandButton without preventing the action and actionListener from being called?
你也可以顯示一些HTML嗎?您不需要在'onclick'處理程序中將'javascript:'腳本作爲前綴。 – CodingIntrigue