...停在矩形上可以看到坐标更多Canvas 实例 下面的在 canvas 元素上.2011年7月9日 - 而是使用了在画布上的鼠标移动(mouse movement)。我没有打算做跨浏览器的.
基于1个网页-相关网页
In between, the move method receives the coordinates of every mouse movement.
在这两个方法调用之间,move方法接收每次鼠标移动的坐标。
Sending every mouse movement might not be a very efficient use of the system, but it demonstrates the interactivity of Ajax.
如果在每次移动鼠标时都发送它的位置,那么系统的使用效率可能较低,但是这演示了Ajax的交互性。
Next, add into the init method the code to link the mouse movement handler with the event and save all your changes. Your init method should look something like Listing 9.
接下来,在init方法中添加代码,将鼠标移动处理程序与事件关联起来,然后保存修改。
应用推荐