简单教程
提交运行
代码编辑器:
<script runat="server"> Sub getCoordinates(sender As Object, e As ImageClickEventArgs) mess.Text="Coordinates: " & e.x & ", " & e.y End Sub </script> <!DOCTYPE html> <meta charset="utf-8" /> <form runat="server"> <p>Click on the image:</p> <asp:ImageButton runat="server" ImageUrl="/static/i/smiley.gif" OnClick="getCoordinates"/> <p><asp:label id="mess" runat="server"/></p> </form>
运行结果: