JS动态显示表格上下frame的方法

2019-12-18,,,,

本文实例讲述了JS动态显示表格上下frame的方法。分享给大家供大家参考。具体如下:

<!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>

希望本文所述对大家的javascript程序设计有所帮助。

您可能感兴趣的文章:

  • JS动态修改表格cellPadding和cellSpacing的方法
  • JS实现为表格动态添加标题的方法
  • JS实现从表格中动态删除指定行的方法
  • JS实现向表格中动态添加行的方法
  • js动态修改表格行colspan列跨度的方法
  • JS控制网页动态生成任意行列数表格的方法
  • JS动态改变表格边框宽度的方法

《JS动态显示表格上下frame的方法.doc》

下载本文的Word格式文档,以方便收藏与打印。