【问题标题】:Creating a right mouse button click event handler创建鼠标右键单击事件处理程序
【发布时间】:2018-02-03 21:20:10
【问题描述】:

当我用鼠标右键按下我的 ImageButton 控件时,我希望有一个特定的事件处理程序可以工作。我怎样才能做到这一点?我使用 asp.net。

【问题讨论】:

    标签: asp.net event-handling right-click


    【解决方案1】:

    您必须使用客户端技术来捕获它,例如 js/Jquery。类似的东西

    <script type="text/javascript"> $(function () { $("#ImageButton").mousedown(function (e) { if (e.which == "3") { // Do magic. } }) }); </script>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-08-06
      • 2011-05-30
      • 1970-01-01
      • 1970-01-01
      • 2014-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多