[英]jquery mousemove event with iframe
當光標進入iframe時,mousemove事件停止工作: 示例
$(document)
.on('mousemove', function(event) {
console.log(event)
})
在iframe區域上是否可以跟隨光標?
您可以使用:
$(window).on('mousemove', function (event) {
console.log( event.target.tagName + ': ' + event.type);
});
要么:
$(function () {
$(document).on('mousemove', function (event) {
console.log( event.target.tagName + ': ' + event.type);
});
});
您在$(document).on('mousemove', function (event) {
是:
在dom准備就緒或加載窗口之前執行該事件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.