Sat Dec 29, 2012 9:23 pm
<html>
<head>
<title>Select odd table rows</title>
<script src="jquery-1.8.3.js"></script>
<script>
// Waits until the all document is loaded.
$(document).ready(function(){
// Do something when any button is clicked
$("button").click(function(){
// Hide all odd rows
$("tr:odd").hide();
});
});
</script>
</head>
<body>
<table border="1">
<tr>
<th>ID</th><th>NAME</th><th>AGE</th><th>CLASS</th>
</tr>
<tr>
<td>1221</td><td>JOZEF AZZAM</td><td>12</td><td>2A</td>
</tr>
<tr>
<td>5433</td><td>Adam Kina</td><td>12</td><td>2A</td>
</tr>
<tr>
<td>8454</td><td>Mohamed Salam</td><td>12</td><td>2A</td>
</tr>
<tr>
<td>3423</td><td>Shabbir Ashraf</td><td>13</td><td>3A</td>
</tr>
</table>
<button >Hide</button>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.