HTML DOM Underline 對象

Underline 對象

Underline 對象代表 HTML <u> 元素。

訪問 Underline 對象

您可使用 getElementById() 來訪問 <u> 元素:

var x = document.getElementById("myU");

親自試一試

創建 Underline 對象

您可使用 document.createElement() 方法來創建 <u> 元素:

var x = document.createElement("U");

親自試一試

標準屬性和事件

Underline 對象支持標準屬性事件

相關頁面

HTML 教程:HTML 文本格式化元素

HTML 參考手冊:HTML <u> 標簽