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.
ある関数では、別のアイテムとは何の関係もありませんが、id 'item' の div で javascript で onmouseover イベントをトリガーするにはどうすればよいですか?
onmouseoverその要素の関数を呼び出すだけです。
onmouseover
document.getElementById("item").onmouseover()
document.getElementById("item")要素を参照し、マウスオーバーイベントの関数を参照し、それに追加するとその関数が呼び出されます。elem.onmouseover()
document.getElementById("item")
elem
.onmouseover
()