JS dynamically displays frame up and down the table

  • 2020-05-19 04:16:58
  • OfStack

This example shows how JS dynamically displays frame up and down a table. Share with you for your reference. The details are as follows:


<!DOCTYPE html>
<html>
<head>
<script>
function aboveFrames()
{
document.getElementById('myTable').frame="above";
}
function belowFrames()
{
document.getElementById('myTable').frame="below";
}
</script>
</head>
<body>
<table id="myTable">
<tr>
<td>100</td>
<td>200</td>
</tr>
<tr>
<td>300</td>
<td>400</td>
</tr>
</table>
<br>
<input type="button" onclick="aboveFrames()"
value="Show above frames">
<input type="button" onclick="belowFrames()"
value="Show below frames">
</body>
</html>

I hope this article has been helpful to your javascript programming.


Related articles: