Document:scripts 属性
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since June 2018.
Document
接口的 scripts
属性返回文档中 元素的列表。返回的对象是
HTMLCollection
。
值
HTMLCollection
。你可以像使用数组一样使用它来获取列表中的所有元素。
示例
规范
Specification |
---|
HTML # dom-document-scripts-dev |