Programmatically triggering events in Javascript for IE using jQuery

后端 未结 6 1003
陌清茗
陌清茗 2021-01-04 19:22

When an Event is triggered by a user in IE, it is set to the window.event object. The only way to see what triggered the event is by accessing the window.

6条回答
  •  迷失自我
    2021-01-04 20:26

    Consider setting the hidden field _EVENTTARGET value before initiating the event with javascript. You'll need to set it to the server side id (replace underscore with $ in the client id) for the server to understand it. I do this on button clicks that I simulate so that the server side can determine which OnClick method to fire when the result gets posted back -- Ajax or not, doesn't really matter.

提交回复
热议问题