变换背景颜色,是一下就看到效果了。
另外,你在51JS叫什么?

解决方案 »

  1.   

    function changeto(highlightcolor){
    source=event.srcElement // 取得发生事件对象的上级
    if (source.tagName=="TR"||source.tagName=="TABLE") // 如果是对象tr或table
    return
    while(source.tagName!="TD") // 如果不是td
    source=source.parentElement // 继续向上,直到是td 为止
    if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore") //如果td的背景色不是指定的同时该td的id不是ignore
    source.style.backgroundColor=highlightcolor // 设置背景
    }
    怎么这么奇怪