function SelectRow(objLink)
{
var obj = objLink;
var trObj = obj.parentNode.parentNode;
var tdcount=trObj.childNodes.length;
for(i=0;i<tdcount;i++)
{
if(trObj.childNodes[i]==obj.parentNode)
trObj.childNodes[i].style.backgroundColor="#FFC";
else
trObj.childNodes[i].style.backgroundColor="#FFF";
}
}ie 6.0 下通过
{
var obj = objLink;
var trObj = obj.parentNode.parentNode;
var tdcount=trObj.childNodes.length;
for(i=0;i<tdcount;i++)
{
if(trObj.childNodes[i]==obj.parentNode)
trObj.childNodes[i].style.backgroundColor="#FFC";
else
trObj.childNodes[i].style.backgroundColor="#FFF";
}
}ie 6.0 下通过
如:var buttonOn;
function SelectRow(objLink)
{
if(buttonOn)buttonOn.style.backgroundColor = "";
buttonOK = objLink; while (buttonOK .tagName!="TD")
{
buttonOK =buttonOK .parentElement;
}
buttonOK .style.backgroundColor ="#FFC";
}
function SelectRow(objLink)
{
if(obj)obj.style.backgroundColor = ""
obj = objLink; while (obj.tagName!="TD")
{
obj=obj.parentElement;
}
obj.style.backgroundColor ="#FFC";
}