<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Bordered Table</h2>
<p>The .table-bordered class adds borders to a table:</p>
<table border="1">
<tr>
<th>Select</th>
<th>Cell phone</th>
<th>Rating</th>
<th>Location</th>
</tr>
<tr>
<td align="center"><input type="checkbox" class="case" name="case[]" value="1"/></td>
<td>BlackBerry Bold 9650</td>
<td>2/5</td>
<td>UK</td>
</tr>
<tr>
<td align="center"><input type="checkbox" class="case" name="case[]" value="2"/></td>
<td>Samsung Galaxy</td>
<td>3.5/5</td>
<td>US</td>
</tr>
<tr>
<td align="center"><input type="checkbox" class="case" name="case[]" value="3"/></td>
<td>Droid X</td>
<td>4.5/5</td>
<td>REB</td>
</tr>
</table>
<table class="table table-bordered" id="myTable">
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<p id="info"></p>
</tbody>
</table>
</div>
<script>
function myfunc(ele) {
var values = new Array();
$.each($("input[name='case[]']:checked").closest("td").siblings("td"),
function () {
values.push($(this).text());
});
document.getElementById("info").innerHTML= values.join (", ");
}
$(document).ready(function() {
$("input.case").click(myfunc);
});
</script>
</body>
</html>
Hey can you describe your problem a bit more?
hi…this is my code
Bootstrap ExampleBordered Table
The .table-bordered class adds borders to a table:
Select | Cell phone | Rating | Location |
---|---|---|---|
BlackBerry Bold 9650 | 2/5 | UK | |
Samsung Galaxy | 3.5/5 | US | |
Droid X | 4.5/5 | REB |
Firstname | Lastname |
---|
if i first table select check box copy to next table using jquery .can u help me
I am really not able to understand what problems you are facing or what you are trying to achieve
my apologies