弃用
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.

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
select 弃用 非标 Chrome 35 Edge ≤79 Firefox 28 — 59 Disabled
不支持 28 — 59 Disabled
Disabled ). To change preferences in Firefox, visit
IE No Opera 26 Safari No WebView Android 37 Chrome Android 37 Firefox Android 28 — 59 Disabled
不支持 28 — 59 Disabled
Disabled ). To change preferences in Firefox, visit
Opera Android 26 Safari iOS ? Samsung Internet Android 3.0

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

非标。预期跨浏览器支持较差。

非标。预期跨浏览器支持较差。

弃用。不要用于新网站。

弃用。不要用于新网站。

用户必须明确启用此特征。

用户必须明确启用此特征。

另请参阅

元数据

  • 最后修改: