Creating a loop from a series of onMouseOver Events
问题 how can I create a loop out of this function. window.onload = function makeHalo() { document.getElementById("d1").onmouseover = function() { this.id ="d1On"; this.className="hover"; document.getElementById("menu1").style.color="#6DC5E6"; }; document.getElementById("menu1").onmouseover = function() { this.style.color="#6DC5E6"; document.getElementById("d1").className="hover"; document.getElementById("d1").id="d1On"; }; document.getElementById("d1").onmouseout = function() { this.id ="d1"; this