Read table contents

HTML

[‎9/‎19/‎2018 10:54 AM]  
980-373-0406
ready when you are
 
[‎9/‎19/‎2018 10:55 AM]  Kandasamy, Shanmugapriya:  
ok
 
[‎9/‎19/‎2018 11:15 AM]  Kandasamy, Shanmugapriya:  
No Title 
<table id="tableSubParamValues" class="footable"> 
 	<tbody> 
 	<tr> 
 	<td class="hidden"></td> 
 	<td><strong>Parameter Group</strong></td> 
 	<td><strong>Parameter</strong></td> 
 	<td><strong>Sub Parameter</strong></td> 
 	<td><strong>Value</strong></td> 
 	<td><strong>Actions</strong></td> 
 	</tr> 
 	<tr> 
 	<td id="tdSubparamId" class="col-sm-2 hidden">1</td> 
 	<td id="tdParameterGroupName" class="col-sm-2">UCBW Mode 1 - 15.4.2 upd</td> 
 	<td id="tdParameterName" class="col-sm-2">Prompt neutron lifetime</td> 
 	<td id="tdSubparamName" class="col-sm-2">BOC,min</td> 
 	<td id="tdValue" class="col-sm-2"><input type="text" value=&gt;=16></td> 
 	<td class="col-sm-2"><button class="deleteBtn" value="Delete" onclick="linkSubParams()">Delete</button></td> 
 	</tr> 
 	<tr> 
 	<td id="tdSubparamId" class="col-sm-2 hidden">2</td> 
 	<td id="tdParameterGroupName" class="col-sm-2">UCBW Mode 1 - 15.4.2 upd</td> 
 	<td id="tdParameterName" class="col-sm-2">Prompt neutron lifetime</td> 
 	<td id="tdSubparamName" class="col-sm-2">BOC,max</td> 
 	<td id="tdValue" class="col-sm-2"><input type="text" value=&lt;=22></td> 
 	<td class="col-sm-2"><button class="deleteBtn" value="Delete" onclick="linkSubParams()">Delete</button></td> 
 	</tr> 
 	<tr> 
 	<td id="tdSubparamId" class="col-sm-2 hidden">3</td> 
 	<td id="tdParameterGroupName" class="col-sm-2">UCBW Mode 1 - 15.4.2 upd</td> 
 	<td id="tdParameterName" class="col-sm-2">Prompt neutron lifetime</td> 
 	<td id="tdSubparamName" class="col-sm-2">EOC,max</td> 
 	<td id="tdValue" class="col-sm-2"><input type="text" value=&lt;=32></td> 
 	<td class="col-sm-2"><button class="deleteBtn" value="Delete" onclick="linkSubParams()">Delete</button></td> 
 	</tr> 
 	 
 	</tbody> 
 	</table> 
 
 


<button id="click">Click Me</button>

<div id="01"...

CSS

td { border: 1px solid green; padding: 5px; }
button { margin: 5px 0px; }
.place { border: 1px solid blue; padding: 10px; margin: 5px 0px; }

JavaScript

$('#click').click(function() {
    //loop through each table row
    $(".tableSubParamValues tbody").find("tr").each(function () {
    
    con
        //get the ID from the first TD
        var ID = $(this).children(':first').text();
        
        //create an array to hold the info from each TD within a TR
        var rowInfo = new Array();
        
        //loop through each TD in the row and add the text to the array
        $(this).children('td').each(function() {
            rowInfo.push($(this).text());
        })
        
        //create a string from the array, separated by a PIPE (|) character
        newString = rowInfo.join(" | ");
        
        //pop the new string into the relavant DIV
        $("#" + ID).html(newString);
    });
});