<html>
<head>
<script>
function displayResult()
{
document.getElementById("myCap").style.captionSide="bottom";
}
</script>
</head>
<body>
<table border="1">
<caption id="myCap">My savings</caption>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$150</td>
</tr>
</table>
<br>
<button type="button" onclick="displayResult()">Move table caption</button>
</body>
</html>