Table tr td th表格使用案例

news/2024/10/17 22:21:06/

caption 属性返回了表格的 caption 元素。

caption 元素定义了表格的标题。

注意: <caption> 元素定义了一个表格标题。<caption> 标签必须紧跟在 <table> 标签之后,每个表格仅能规定一个 caption。通常,caption 会位于表格之上居中的位置。

<html>
<head>
<script>
function displayResult()
{
alert(document.getElementById("myTable").caption.innerHTML);
}
</script>
</head>
<body><table id="myTable" border="1">
<caption>This is a table caption</caption><tr><td>cell 1</td><td>cell 2</td></tr><tr><td>cell 3</td><td>cell 4</td></tr>
</table>
<br>
<button type="button" οnclick="displayResult()">Alert table caption</button></body>
</html>




 
  1. <table width="300" border="1" cellspacing="0"> 
  2.     <tr> 
  3.         <th>班级</th> 
  4.         <th>日期</th> 
  5.         <th>标题</th> 
  6.     </tr> 
  7.     <tr> 
  8.         <td>一班</td> 
  9.         <td>2012-5-10</td> 
  10.         <td>标题1</td> 
  11.     </tr> 
  12.     <tr> 
  13.         <td>二班</td> 
  14.         <td>2012-5-20</td> 
  15.         <td>标题2</td> 
  16.     </tr> 
  17. </table> 

DW软件里截图:

table布局案例截图
table案例教程布局截图

谷歌浏览器效果截图:

浏览器中table布局案例截图
table表格布局案例在浏览器中截图



http://www.ppmy.cn/news/533614.html

相关文章

table后台动态添加tr,前台绑定事件

业务需求更改&#xff0c;table中原本前台绑定已有元素事件&#xff0c;变成后台渲染元素&#xff0c;前台加事件 原本用元素 on直接绑定&#xff0c;但是一直不起作用&#xff0c;查了相关资料&#xff0c;找到方法 $("table tbody").on("click",tr a,fu…

Python爬虫入门:爬虫抓取沪深300指数列表

使用Python3爬取沪深300指数列表 1. 思路分析 用chrome打开维基百科沪深300的页面&#xff0c;网址为&#xff1a;https://en.wikipedia.org/wiki/CSI_300_Index 。如下图一所示&#xff0c;可见沪深300指数股票列表。其中&#xff0c;包含了股票代号、公司名&#xff0c;交易…

WL2801E18-5/TR CMOS线性稳压器WL2801E30-5/TR WL2801E33-5/TR

WL2801E 低噪声&#xff0c;高PSRR&#xff0c;高速&#xff0c;CMOS LDO 说明 WL2801E系列是一款高精度&#xff0c;低噪声&#xff0c;高速&#xff0c;低压差CMOS线性稳压器高纹波抑制。这些设备提供了新的水平 在手机&#xff0c;笔记本电脑中具有成本效益和笔记本电脑&…

[Java面试三]JavaWeb基础知识总结.

1.web服务器与HTTP协议 Web服务器 l WEB,在英语中web即表示网页的意思,它用于表示Internet主机上供外界访问的资源。 l Internet上供外界访问的Web资源分为: • 静态web资源(如html 页面):指web页面中供人们浏览的数据始终是不变。 • 动态web资源:指web页面中供人…

checkbox全选和取消,附带单击表格tr选中功能

<html> <head> test </head> <body> <table width"300px" border"1"><tr><th><input type"button" style"display:block" id"selectAll" value"全选"><input…

基于Linux内核红黑树的TR069参数解析工具:树形结构+CPE RPC支持

目录 tr069_oid.h tr069_oid.c demo.c tr069_oid.h /* Dependencies ------------------------------------------------------------------------------------------------------*/#ifndef __CPE_OID_REG_H #define __CPE_OID_REG_H 1#include "easy_macros.h" …

【HTML】表格标签(table,tr,td)

* 表格的主要作用是什么&#xff1f;表格主要作用是布局可以先将表格画出来,然后往表格中放入数据现代的网页布局采用table比较少&#xff0c;采用div布局比较多* 表格相关语法&#xff1a; 1. 表格是table标签 2. border是table标签的一个属性&#xff0c;border是属性名,1px是…

TR-069 Device:2.11 Root Object definition, tr-181-2-11-0.xml

https://cwmp-data-models.broadband-forum.org/tr-181-2-11-0.html#R.TR-098 目录 License Summary Table of Contents Data Types References License Copyright (c) 2010-2017, Broadband Forum Redistribution and use in source and binary forms, with or withou…