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.
YAHOO.util.Event.on("divName", "mouseenter", function (e) { }
此代码适用于除 chrome 之外的所有浏览器。YUI 2.x for chrome 有什么问题吗?
作为替代方案,当我使用以下代码时,它适用于所有浏览器。
document.getElementById("divName").onmouseover = function() { // code to run when the user hovers over the div };