Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
文档http://developer.yahoo.com/yui/3/event/#eventsimulation。但我不明白该怎么做(那么如何使用 YUI 在某些 HTML 对象的客户区中的点(X,Y)处模拟鼠标按下?
尝试:
Y.Event.simulate(document.body, "click", { pageX:10,pageY:20 });
如果我以这种方式很好地理解了文档,您可以在坐标 X=10 和 Y=20 处模拟对身体的点击。第一个参数是html元素,第二个是事件类型,最后一个是事件数据。