function addValidEvent(item,event,func)
{
if (item.addEventListener)
{
item.addEventListener(event, func, false);
}
else
if (item.attachEvent)
{
item.attachEvent("on" + event, func);
} else {
//todo
}
}
I call it like
addValidEvent(element, "mouseover", inRadio(element));
inRadio this is other function, I need to register this with out call a inRadio in addValidEvent call.
How to correct pass the function like param ?