1
window
/document
オブジェクトにmouseout
イベントリスナーを追加しました。
カーソルをページのiframeに移動するとこのイベントがトリガーされますが、bodyの他の要素でもトリガーされます。JS:ドキュメント/ウィンドウのmouseoutイベント
document.addEventListener('mouseout', function(event) {
event.stopPropagation()
console.log('out')
}, true)
// not working so I try adding this event to widow
window.addEventListener('mouseout', function(event) {
event.stopPropagation()
console.log('out')
}, true)
// not working too
助けてください!
document.getElementById("sa").contentDocument.addEventListener('mouseout', function(event) {
event.stopPropagation()
console.log('out')
}, true)
をしかし、あなたのコンテンツは、クロスドメインがある場合は、アクセス権のエラーで終わる可能性があります読んでくれてありがとう:)