How to call a code behinds button click event usin

2020-04-03 14:27发布

Is it possible to call a server side buttons click event using javascript or jquery If yes then how to do it

7条回答
家丑人穷心不美
2楼-- · 2020-04-03 15:21

Whether it is a server side control or client side control when the click is triggered in client, based on the attributes it will formulate the server events. Consider an Serverside button from asp.net page, when you trigger click event from javascript/jquery, normally it will make a postback event to the server because of the attribute runat=server. Below is the syntax for triggering the click event in jQuery.

$('#buttonID').click();
查看更多
登录 后发表回答