HTML DOMUlオブジェクト
Ulオブジェクト
Ulオブジェクトは、HTMLの<ul>要素を表します。
ULオブジェクトにアクセスする
getElementById()を使用して、<ul>要素にアクセスできます。
例
var x = document.getElementById("myUL");
Ulオブジェクトを作成する
document.createElement()メソッドを使用して<ul>要素を作成できます。
例
var x = document.createElement("UL");
Ulオブジェクトのプロパティ
Property | Description |
---|---|
compact | Not supported in HTML5. Use
style.lineHeight instead. Sets or returns whether the unordered list should render smaller than normal, or not |
type | Not supported in HTML5. Use
style.listStyleType instead. Sets or returns the value of the type attribute of an unordered list |
標準のプロパティとイベント
Ulオブジェクトは、標準のプロパティとイベントをサポートします。
関連ページ
HTMLチュートリアル:HTMLリスト
HTMLリファレンス:HTML <ul>タグ