document.getElementById(id).style.color="#60A5DD";

解决方案 »

  1.   

    不行哦.color有哪个字母要大写吗?我发现要是属性词大小写搞错是不行的.我的javascript很水的.谢谢指教.
      

  2.   

    document.getElementById(id).color="#60A5DD";
      

  3.   

    document.getElementById(id).color="#60A5DD";这个方法也不行.
    很奇怪
      

  4.   

    function settdcolor(id){
       document.getElementById(id).style.backgroundColor="#60A5DD";
       document.getElementById(id).color="red";
       }<td width="70" align="right" id="tagopen" onclick="settdcolor('tagopen');">背景颜色都设置成功,也就是说
    document.getElementById(id).style.backgroundColor="#60A5DD";这个是OK的.但    document.getElementById(id).color="red";这个设置字体颜色不行.不知为什么.大家再帮忙想想吧.谢谢.不够分我就加多点分下去.
      

  5.   

    少了style
    document.getElementById(id).style.color="#60A5DD";
      

  6.   

    在td里加上这个
    onclick="this.style.color='#60A5DD'"
      

  7.   

    impeller(竹子) ( ) 信誉:100  2006-08-02 09:15:00  得分: 0  
     
     
       少了style
    document.getElementById(id).style.color="#60A5DD";
      
     
    ---------------------------------------------------------------------这个对