Sr.No. | Student Name | Roll No. | DOB | Address | Father’s Name | Mother’s Name | Class | Course |
Method 1
<!DOCTYPE html>
<html>
<head>
<title>M2-R5.1 Set 1 Question 3 (Method 1)</title>
</head>
<body>
<table border=1 cellspacing=”0″ width=”60%” height=350px>
<tr>
<th>Sr. No.</th>
<th>Student Name</th>
<th>Roll No.</th>
<th>DOB</th>
<th>Address</th>
<th>Father’s Name</th>
<th>Mother’s Name</th>
<th>Class</th>
<th>Course</th>
</tr>
<tr>
<td>1.</td>
<td>Vijay Kumar</td>
<td>12312</td>
<td>10/07/1985</td>
<td>Dwarika, New Delhi</td>
<td>Santosh Kumar</td>
<td>Subhawati Devi</td>
<td>Semester 2</td>
<td>B.Tech</td>
</tr>
<tr>
<td>1.</td>
<td>Vijay Kumar</td>
<td>12312</td>
<td>10/07/1985</td>
<td>Dwarika, New Delhi</td>
<td>Santosh Kumar</td>
<td>Subhawati Devi</td>
<td>Semester 2</td>
<td>B.Tech</td>
</tr>
<tr>
<td>1.</td>
<td>Vijay Kumar</td>
<td>12312</td>
<td>10/07/1985</td>
<td>Dwarika, New Delhi</td>
<td>Santosh Kumar</td>
<td>Subhawati Devi</td>
<td>Semester 2</td>
<td>B.Tech</td>
</tr>
</table>
</body>
</html>
Method 2
<!DOCTYPE html>
<html>
<head>
<title>M2-R5.1 Set 1 Question 3 (Method 2)</title>
</head>
<body>
<table border=1 cellspacing=”0″ width=”60%” height=350px>
<tr>
<th>Sr. No.</th>
<th>Student Name</th>
<th>Roll No.</th>
<th>DOB</th>
<th>Address</th>
<th>Father’s Name</th>
<th>Mother’s Name</th>
<th>Class</th>
<th>Course</th>
</tr>
<script type=”text/javascript”>
var n=parseInt(prompt(“Enter How many Student Add in a Table (no of row “))
for (var i=1;i<=n;i++)
{
document.write(“<tr height=50px><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>”);
}
</script>
</table>
</body>
</html>