<!DOCTYPE html>
<html>
<head>
<title>
How to specify the HTML content of the page to show in the "iframe" in HTML?
</title>
</head>
<body>
<h3>How to specify the HTML content of the page to show in the "iframe" in HTML?</h3>
<p>We can do it by using <b>srcdoc</b> attribute of iframe in HTML.</p><div class="aritcle_card flexRow">
<div class="artcardd flexRow">
<a class="aritcle_card_img" href="/xiazai/code/10931" title="诚石C2C交易系统"><img
src="https://img.php.cn/upload/webcode/000/000/007/176433120262103.jpg" alt="诚石C2C交易系统" onerror="this.onerror='';this.src='/static/lhimages/moren/morentu.png'" ></a>
<div class="aritcle_card_info flexColumn">
<a href="/xiazai/code/10931" title="诚石C2C交易系统">诚石C2C交易系统</a>
<p>1. 页面全部经过SEO(搜索引擎优化)处理 2. 支持IE、FireFox等主流浏览器,在IE 和FireFox下显示相同的效果 3. 符合W3C国际网页标准,页面全部采用DIV+CSS布局 4. 采用SQL server数据库,所有数据库操作采用存储过程 5. 部分功能采用AJAX技术,良好的用户体验。 6. 后台集成在线HTML编辑软件FCKEditor,自定义美观的内容</p>
</div>
<a href="/xiazai/code/10931" title="诚石C2C交易系统" class="aritcle_card_btn flexRow flexcenter"><b></b><span>下载</span> </a>
</div>
</div>
<iframe srcdoc="<h2>You can find any tutorial on tutorialspoint</h2>">
<p>Browser does not support iframes.</p>
</iframe>
</body>
</html>
正如我们在输出中看到的,文档中的 HTML 内容(
元素)显示在 中。
示例 2
以下是 HTML Iframe 的另一个示例,在此,我们在 iframe 中创建了一个表格。
<!DOCTYPE html>
<html>
<head>
<title>
How to specify the HTML content of the page to show in the "iframe" in HTML?
</title>
</head>
<body>
<h3>How to specify the HTML content of the page to show in the "iframe" in HTML?</h3>
<p>We can do it by using <b>srcdoc</b> attribute of iframe in HTML.</p>
<iframe srcdoc="<table border = 3>
<caption> Abbreviations </caption>
<tr>
<th> HTML </th>
<th> CSS </th>
</tr>
<tr>
<td> Hypertext markup language</td>
<td> Cascading style sheet </td>
</tr>
</table>">
<p>Browser does not support iframes.</p>
</iframe>
</body>
</html>
正如我们在输出中看到的,文档中的 HTML 内容(HTML 表格)显示在 中。
示例 3
默认情况下,所有浏览器都会将 显示为默认值。我们可以使用CSS来改变的样式。
在下面的示例中,
我们通过使用 CSS 更改 的宽度、高度和边框来更改其样式。
我们使用带有 标记的“srcdoc”属性来指定要在 HTML 中的 中显示的页面( 元素)的 HTML 内容。
<!DOCTYPE html>
<html>
<head>
<title>
How to specify the HTML content of the page to show in the "iframe" in HTML?
</title>
</head>
<body>
<h3>How to specify the HTML content of the page to show in the "iframe" in HTML?</h3>
<p>We can do it by using <b>srcdoc</b> attribute of iframe in HTML.</p>
<iframe srcdoc="<div> Hello Disha</div>" width="50%" height="100" style="border:3px solid green;">
<p>Browser does not support iframes.</p>
</iframe>
</body>
</html>
正如我们在输出中看到的,文档中的 HTML 内容( 元素)显示在 中,并且我们还使用 CSS 更改了 的样式。
本专题围绕 C# 在现代后端架构中的微服务实践展开,系统讲解基于 ASP.NET Core 构建可扩展服务体系的核心方法。内容涵盖服务拆分策略、RESTful API 设计、服务间通信、API 网关统一入口管理以及服务治理机制。通过真实项目案例,帮助开发者掌握构建高可用微服务系统的关键技术,提高系统的可扩展性与维护效率。
本专题围绕 Go 语言在高并发任务处理场景中的实践展开,系统讲解 Goroutine 调度模型、Channel 通信机制以及并发控制策略。内容包括任务队列设计、Goroutine 池化管理、资源限制控制以及并发任务的性能优化方法。通过实际案例演示,帮助开发者构建稳定高效的 Go 并发任务处理系统,提高系统在高负载环境下的处理能力与稳定性。