弃用
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the
兼容性表格
at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
HTMLContentElement.select
property reflects the
select
attribute. It is a
DOMString
containing a space-separated list of CSS selectors that select the content to insert in place of the <content> element.
object.select = "CSSselector CSSselector ...";
// Select <h1> elements and elements with class="error" myContentObject.select = "h1 .error";
This feature is no longer defined by any standards.
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
select
弃用
非标
|
Chrome 35 | Edge ≤79 |
Firefox
28 — 59
Disabled
|
IE No | Opera 26 | Safari No | WebView Android 37 | Chrome Android 37 |
Firefox Android
28 — 59
Disabled
|
Opera Android 26 | Safari iOS ? | Samsung Internet Android 3.0 |
完整支持
不支持
兼容性未知
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
用户必须明确启用此特征。
HTMLContentElement
getDistributedNodes()
select