javascript table cell value query modification

var apiGroupDefinitionTable = document.getElementById("apiGroupDefinitionTable");
        for(var i=1;i<apiGroupDefinitionTable.rows.length;i++)
          {
                // Traverse row by row, modifying the value of the second column.
                apiGroupDefinitionTable.rows[i].cells[1].innerHTML = str;
                		
                // Traverse row by row and modify the value of the third column.
                var cell3value = apiGroupDefinitionTable.rows[i].cells[2].innerHTML;
                var code = cell3value.substring(cell3value.indexOf('">')+2,cell3value.indexOf('</a>'));
                var groupId = apiGroupDefinitionTable.rows[i].getAttribute("index");
                apiGroupDefinitionTable.rows[i].cells[2].innerHTML
                	= '<a href="' + App.getUrl('+/detail', {'id':groupId, category:str}) + '">' + code + "</a>";
               }

 

 

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326130551&siteId=291194637