菜鸟学堂
在线运行
源代码
<script runat="server"> Sub getCoordinates(sender As Object, e As ImageClickEventArgs) mess.Text="Coordinates: " & e.x & ", " & e.y End Sub </script> <!DOCTYPE html> <html> <body> <form runat="server"> <p>Click on the image:</p> <asp:ImageButton runat="server" ImageUrl="smiley.gif" OnClick="getCoordinates"/> <p><asp:label id="mess" runat="server"/></p> </form> </body> </html>
运行结果
在线运行
菜鸟学堂 edu.jb51.net