ICANN认证国际域名顶级注册机构
网站建设,域名注册,空间租用,软件销售,广告设计 域名注册,空间租用, 网站建设,东莞网页设计,域名注册,网站推广,网站开发,网页设计 网站推广,,百度推广,新浪推广,雅虎推广,网易推广 标志设计,画册设计,包装设计,VI策划,企业形象顾问 连邦软件加盟店,提供销遥行,管家婆,速达,用友ERP,诺顿等软件报价及销售 建站必读 腾达网络,上网帮助中心, 腾达为东莞等地,提供网站建设,网站推广,广告设计,软件销售等优质服务!
建站必读


 
 
当前位置:首页 -> 建站必读 -> ASP技术
How to Build Tables Dynamically(-)
How to Build Tables Dynamically



--------------------------------------------------------------------------------



This article discusses the structure of HTML tables and explains how to use the Table Object Model to create them. It also compares how the Table Object Model and the Document Object Model (DOM) are used to create tables.



The Table Object Model, introduced in Microsoft® Internet Explorer 4.0, enables you to have dynamic control over the content of tables—for example, you can add rows and cells, change the contents of cells, and resize table elements. Dynamic control is useful in situations such as building a table based on the contents of a database, or building a table of calculated data, such as a calendar.



Note When using Dynamic HTML (DHTML) to create a document, you can create objects and set the innerText or innerHTML property of the object. However, because of the specific structure required by tables, the innerText and innerHTML properties of the table and tr objects are read-only.



This article assumes you know how to write Microsoft® JScript® (compatible with ECMA 262 language specification).



Table Structure

Creating and Manipulating Tables

Table Object Model vs. the DOM

Sample Game Using the Table Object Model and the DOM

Table Structure

As a reminder, here is a discussion about the structure of tables. Tables consist of rows and columns, arranged in a manner similar to a spreadsheet. The following steps and sample code show how to use HTML to create a table.



Create opening and closing table tags.

Place tr tags within the table tags; the tr tags denote rows.

Place td tags within the tr tags; the td tags denote cells within rows.

Show Example

<TABLE BORDER="1">

  <TR>

    <TD>Stock Symbol</TD>

    <TD>High</TD>

    <TD>Low</TD>

    <TD>Close</TD>

  </TR>

  <TR>

    <TD>ABCD</TD>

    <TD>88.625</TD>

    <TD>85.50</TD>

    <TD>85.81</TD>

  </TR>

  <TR>

    <TD>EFGH</TD>

    <TD>102.75</TD>

    <TD>97.50</TD>

    <TD>100.063</TD>

  </TR>

  <TR>

    <TD>IJKL</TD>

    <TD>56.125</TD>

    <TD>54.50</TD>

    <TD>55.688</TD>

  </TR>

  <TR>

    <TD>MNOP</TD>

    <TD>71.75</TD>

    <TD>69.00</TD>

    <TD>69.00</TD>

  </TR>

</TABLE>

Tables can also consist of headers, footers, captions, and multiple tBody elements. Most browsers automatically add the tBody tag to the HTML stream to create well-formed HTML.



You can use the following HTML elements to create tables.



table Wraps the entire table. Use the table element to apply formatting to the entire table. For example, use the table element to set the width of columns, set the border width, set colors that apply to the whole table, and so on.

tHead Defines the header section of a table. Use tr elements to create multiple rows within a tHead element.

tBody Defines the body of a table. You can use tBody elements to format parts of a table. For example, you can have multiple tBody elements in a table, each with different colors or fonts. The following example demonstrates this technique.

 
 
本站关键词:
|东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广||东莞软件开发|东莞软件设计|东莞主页设计|东莞公司主页|东莞建站套餐|东莞建站服务|东莞商标设计|东莞商标注册|东莞yahoo推广|东莞网络实名|东莞百度baidu推广|东莞google推广|
域名注册 | 虚拟主机 | 网站建设 | 网站推广 | 广告设计 | 帮助中心 | 软件中心 | 关于腾达
东莞市腾达信息工程有限公司      本站网络实名: 东莞网站建设
地址:东莞市新城市中心区第一国际B座610   邮编:523007
电话:0769-22026071 22026072 传真:0769-22026076 24小时服务热线:13712032014
© 2002~2005 腾达网络   版权所有