A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/zh-CN/docs/Web/API/HTMLIFrameElement/srcdoc below:

HTMLIFrameElement:srcdoc 属性 - Web API

MDN Web Docs
  1. 面向开发者的 Web 技术
  2. Web API
  3. HTMLIFrameElement
  4. HTMLIFrameElement:srcdoc 属性

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

Filter sidebar

在本文中
  1. HTMLIFrameElement
  2. 实例属性
    1. allow
    2. allowFullscreen
    3. allowPaymentRequest 非标准 已弃用
    4. browsingTopics 实验性 非标准
    5. contentDocument
    6. contentWindow
    7. credentialless 实验性
    8. csp 实验性
    9. featurePolicy 实验性
    10. height
    11. loading
    12. name
    13. referrerPolicy
    14. sandbox
    15. src
    16. srcdoc
    17. width
  3. 实例方法
    1. getSVGDocument()
  4. 继承
    1. HTMLElement
    2. Element
    3. Node
    4. EventTarget
在本文中 HTMLIFrameElement:srcdoc 属性

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

HTMLIFrameElement 的 srcdoc 属性指定页面的内容。

示例

js

const iframe = document.createElement("iframe");
iframe.srcdoc = `<!DOCTYPE html><p>你好,世界!</p>`;
document.body.appendChild(iframe);
规范 Specification HTML
# dom-iframe-srcdoc
浏览器兼容性 Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on 2024年5月4日 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4