0
我尝试SRC
包括HTML页面使用iframe
:为什么iframe不显示HTML文件?
<iframe sandbox="allow-same-origin allow-scripts allow-popups allow-forms" src="widget.html">
</iframe>
所以,这种方式显示在iframe中的HTML文件一样简单文本(代码)
HTML文件:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1404.34">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #000000; -webkit-text-stroke: #000000}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #000000; -webkit-text-stroke: #000000; min-height: 14.0px}
span.s1 {font-kerning: none}
</style>
</head>
<body>
<b>test page</b>
</body>
</html>
这个问题可能使用一些更多的细节 –
你这是什么意思?我可以显示'widget.html'文件 – Huligan
以及它只是将widget.html显示为纯文本而不是实际的HTML? –