[英]Need to add keydown event for ASP.net Text box and need to trigger a codebehind function using the keydown event
頁面加載事件:
txtName.Attributes.Add("onkeyup", "return doDataListBind()");`
Javascript:
function doDataListBind()
{
document.getElementById("Button2").click();
}
創建了一個按鈕,並嘗試使用JavaScript觸發點擊事件。
在jQuery中:
$( "#Button2" ).trigger( "click" );
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.