event.srcElement.parentElement.style.backgroundColor=\'blue\';}); 改成
event.srcElement.style.backgroundColor=\'blue\';}); 看看

解决方案 »

  1.   

    nowTR.attachEvent('onmouseover',function(){event.srcElement.parentElement.style.backgroundColor='blue';}); 
            nowTR.attachEvent('onmouseout',function(){event.srcElement.parentElement.style.backgroundColor='';});
      

  2.   

    我刚开始的就是这样的啊
    可是说缺少对象
    他有个<iframe 里面的表格
    <table id="game_table" width="730" border="0" cellspacing="1" cellpadding="0" class="b_tab" >
        <tr class="b_tline_ft">
          <td width="80" ></td>
        </tr>
      </table>  在iframe里面的<frameset rows="0,*" frameborder="NO" border="0" framespacing="0"> 
      <frame name="body_var"  noresize src="body_var.php">      以上的表格在这个body_var.php里面   nowTR.attachEvent('onmouseover',function(){event.srcElement.parentElement.style.backgroundColor='blue';}); 
            nowTR.attachEvent('onmouseout',function(){event.srcElement.parentElement.style.backgroundColor='';}); 这部分在index.php里面
    index.php里面包含的<iframe
      

  3.   

    这样写说缺少对象。。是不是function要传递过去才可以
    前面部分代码如下
    function ShowData_OU(obj_table,GameData,data_amount)
     {
      var nowLeague = \'\';
      var nowDate = \'\';
      with(obj_table)
      {
       //睲埃table戈
       while(rows.length > 1)
        deleteRow(rows.length-1);
       //秨﹍陪ボ秨い辽祘戈
       for(i=0; i<data_amount; i++)
       {
       // if(GameData[i][9]<=0 || GameData[i][10]<=0)GameData[i][8]=\'\';    //耞羛幅琌ぃ陪ボ羛幅
        gdate = GameData[i][1].substr(0,5);
    //    if (document.getElementById("sel_lid").value){
    //     if(document.getElementById("sel_lid").value != GameData[i][2]) continue;
    //    }    if(nowLeague != GameData[i][2] || nowDate != gdate)
        {
         nowLeague = GameData[i][2];
         nowDate = gdate;
         nowTR = insertRow();
         with(nowTR)
         {
          nowTD = insertCell();
          nowTD.colSpan = 14;
          nowTD.className = \'b_hline\';
          var lsys="#daff00";                          
          var lyjd=GameData[i][2];
          var lsysw="';
          echo $langx;
          echo '";
          rooot   =   source.documentElement;  
          sortField=rooot.selectNodes("//w[" + lsysw + " =  \'" + lyjd + "\']"); 
           if(sortField.length>0)          
           {  
           lsys=sortField[0].selectSingleNode("cl").text;
           }
          nowTD.style.cssText="background-color:" + lsys + ";cursor:default;";  
          nowTD.innerHTML = GameData[i][2];
         }
        }
        nowTR = insertRow();
        nowTR.className = \'b_cen\'; 
        //alert(document.getElementsByTagName("tr"));
        //if(nowTR.onmouseover)
      // if( nowTR.attachEvent("onmouseover",aa))
       // {nowTR.style.cssText="background-Color:#008000"; } 
        //nowTR.style.cssText="background-Color:#008000"; 
        nowTR.attachEvent(\'onmouseover\',function(){event.srcElement.parentElement.style.backgroundColor=\'blue\';}); 
        nowTR.attachEvent(\'onmouseout\',function(){event.srcElement.parentElement.style.backgroundColor=\'\';});
    obj_table是传递过来表格的id  gamedate是数据。。
      

  4.   

    全文太长。贴不了。。你加我下好吗。。我的QQ 906426 msn  [email protected] 谢谢
      

  5.   

    你把js方再frame的网页内的页面上
    或是你加328218816再QQ上说
      

  6.   

    试试
    this.style.backgroundColor=\'blue\'
      

  7.   

    为什么字符串要用\'abc\'之类?直接用"abc"或者'abc'不可以?