Get element by ID:
document.getElementById("demo");
Get elements by class name (returns an array of all elements with that class name):
document.getElementsByClassName("demo");
Highlight element mouse is over (not tested, also need to remove highlight once mouse is no longer over element):
document.addEventListener('mousemove', function (e) {
var srcElement = e.srcElement;
srcElement.style.backgroundColor = "yellow";
});
Topic:
Safari & Web
SubTopic:
General
Tags: