Hi people,
I have a class of links defined as .button, they are highly stylized and look like links. I want to set it so that
onmousedown, the background color and border style will change, and will change back to what they were onmouseup. Currently I have functions defined as mDown(x) and mUp(x), where I use x as the parameter and then change them to mDown(this) and mUp(this) as onmousedown and onmouseup attributes of every button. I was wondering if there is a way to set the onmousedown and onmouseup actions for the class as a whole. By the way, in the below code the
element with ID "box" is the table cell in which all of the buttons are located. I was thinking something like this:
var y=document.getElementById("box").getElementsByClassName("button");