簡體   English   中英

當ImageButton具有onClick事件處理程序時,如何在客戶端禁用.NET ImageButton控件?

[英]How can you disable a.NET ImageButton control on the client side when the ImageButton has an onClick event handler?

這樣做的目的是防止用戶在提交/單擊期間多次單擊按鈕。 我已經嘗試了Button控件的不同解決方案,但是它們不適用於ImageButton。

嘗試以下代碼:

imgbutton.OnClientClick = "this.disabled = true;";

一旦按下,這將禁用客戶端上的按鈕。 (語法可能已關閉-我現在無法測試此代碼。)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM