Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

HTMLTableElement.border

非推奨
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.

概要

border は、テーブルのボーダー幅( border 属性の値)の取得 / 設定に用います。

構文

HTMLTableElement.border =borderWidth; //取得
borderWidth = HTMLTableElement.border; //設定
border
テーブルのボーダーのピクセル幅を単位無しで取得 / 設定

// テーブルのボーダー幅を 2 ピクセルに設定する例

var t = document.getElementById("TableA"); // 対象とする table 要素への参照を変数 t に代入

t.border = "2"; // ボーダー幅の設定

注記

border 属性は HTML 4.0 で非推奨属性となっています。代わりに CSS の border-width を間接的、または直接的に使用すると良いでしょう(例: table.bgColor #注記

仕様書

ドキュメントのタグと貢献者

タグ: 
 このページの貢献者: fscholz, AshfaqHossain, ethertank
 最終更新者: AshfaqHossain,