但是,对拖动的处理必须在文档对象中运行,因为要获得所有鼠标移动事件,而不仅仅是光标在目标对象上时发生的鼠标事件。
The drag handling, however, must be running in the document object, because you want to get all mouse-move events, not just those that might happen with the cursor over the target object.
矩形和文本元素对不同的事件 --如移动鼠标和单击 --做出反应,产生一种简单的滚动效果。
The rectangle and text elements react to the different events, such as moving the mouse and clicking, to create a simple rollover effect.
它们会随鼠标移动,当键盘事件发生时不消失。
They follow the cursor's movement, and do not disappear when keyboard events occur.
超负荷的系统加载和各种其他因素会影响Firefox接收鼠标移动和键盘事件。
Heavy system load and a variety of other factors can affect when Firefox receives the mouse move and keyboard events.
接下来,在init方法中添加代码,将鼠标移动处理程序与事件关联起来,然后保存修改。
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.
标签不接受焦点(换句话说,用户不能通过tab键或鼠标移动到标签),因此,标签无法产生输入事件。
Labels do not receive focus (in other words, a user cannot move to the label with the Tab key or a mouse) and, thus, do not generate input events.
在本文中,我们对应用程序进行了改动,让其只对应于单击事件来检索数据,因此,我们不会因鼠标在其上移动而为此图像拉出数据。
In this application, we changed the application to only retrieve data on a click, so we weren't pulling data for every image the mouse zoomed over.
然后,当鼠标移动时,任何浏览器都会在Inactive状态下生成mousemove或mouseout事件。
When the cursor then moves, any browser will generate a mousemove or mouseout event in Inactive state.
正如上面介绍的一样,编辑器标签有一种默认的拖放行为,它将进行重新排列和平铺操作,这可以使用拖放检测、鼠标移动和鼠标释放类型的事件的监听器实现。
As mentioned, Editor tabs have a default drag-and-drop behavior meant for rearranging and tiling, which is implemented by having listeners for drag-detect, mouse-move, and mouse-up event types.
最可靠的方法是移动鼠标,单击窗口(例如,在GoogleSearch框内)并发送Ctrl+t,确保击键事件由Firefox处理。
Moving the mouse, clicking the window (in the Google Search box, for example), and sending the Ctrl+t is the most reliable method of ensuring that the keystrokes are processed by Firefox.
当鼠标指针刚进入元素边界时,以及鼠标指针仍在元素边界内并且移动时,都会发生此事件。
This event occurs both when the mouse pointer is newly moved in the element bounds, and also when the mouse pointer moves while still remaining in the element bounds.
当鼠标指针刚进入元素边界时,以及鼠标指针仍在元素边界内并且移动时,都会发生此事件。
This event occurs both when the mouse pointer is newly moved in the element bounds, and also when the mouse pointer moves while still remaining in the element bounds.
应用推荐