案例:html/html5 案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<iframe srcdoc="<p>Hello world!</p>" src="/example/html/frame_a.html">
6
  <p>Your browser does not support iframes.</p>
7
</iframe>
8
9
<p><b>注释:</b>所有主流浏览器都支持 srcdoc 属性,除了 Internet Explorer。</p>
10
11
</body>
12
</html>