Code:
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function showRows(){
var rows = document.getElementById('theTable').rows, i = rows.length - 1;
for (i; i > -1; --i){
if(rows[i].className === 'hidden'){
rows[i].style.display = '';
}
}
}
</script>
</head>
<body>
<table id="theTable">
<tr><td>1st seen</td></tr>
<tr><td>2nd seen</td></tr>
<tr class="hidden" style="display: none;"><td>3rd unseen</td></tr>
<tr class="hidden" style="display: none;"><td>4rth unseen</td></tr>
<tr class="hidden" style="display: none;"><td>5th unseen</td></tr>
</table>
<input type="button" onclick="showRows();" value="Show Rows">
</body>
</html>
Bookmarks