M
mouseit101
Hello, I'm trying to make a navigation bar and need to assign
mouseover, mouseclick etc. events to a img tag dynamically, here's what
im using:
function getP_Element(p_imgsrc,p_id)
{var tuf = document.createElement("img");
tuf.src=p_imgsrc;
tuf.id=p_id;
tuf.onmouseover="alert('It works!')"
return(tuf);
}
would there need to be some other path like tuf.events.onmouseover?
mouseover, mouseclick etc. events to a img tag dynamically, here's what
im using:
function getP_Element(p_imgsrc,p_id)
{var tuf = document.createElement("img");
tuf.src=p_imgsrc;
tuf.id=p_id;
tuf.onmouseover="alert('It works!')"
return(tuf);
}
would there need to be some other path like tuf.events.onmouseover?