HTML DOM Details 對(duì)象

2023-04-07 14:36 更新

Details 對(duì)象表示一個(gè) HTML <details> 元素。

訪問(wèn) Details 對(duì)象

你可以使用 getElementById() 訪問(wèn) <details> 元素:

varx = document.getElementById("myDetails");嘗試一下

創(chuàng)建一個(gè) Details 對(duì)象

您可以使用 document.createElement() 方法創(chuàng)建 <details> 元素:

var x = document.createElement("DETAILS");嘗試一下

Details 對(duì)象屬性

屬性 描述
open 設(shè)置或者返回 details 標(biāo)簽內(nèi)的描述信息是否顯示。

標(biāo)準(zhǔn)屬性和事件

Details 對(duì)象同樣支持標(biāo)準(zhǔn)的 屬性事件。


相關(guān)文章

HTML 參考手冊(cè): HTML <details> 標(biāo)簽


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)