html5 - 如何用div语法在一个html里插入另外一段html(或者文件)代码并完整显示
问题描述
这个是写出来的效果
这个是原图html效果
<iframe src='https://www.haobala.com/wenda/test12.html' name='iframepage' frameBorder=0 scrolling=no onLoad='iFrameHeight()' ></iframe>这个是代码请问怎么才能显示完整呢?方便的话请提供一下完整代码。。
这里是前半段的代码<!DOCTYPE html><html> <head>
<title>data</title><meta charset='utf-8'><meta name='author' content='2' /><link rel='stylesheet' href='https://www.haobala.com/wenda/zh-CN.css' type='text/css' />
</head> <body>
<textarea id='source'>
class: center, middle, inverse, title-slide
data123<iframe src='https://www.haobala.com/wenda/test12.html' name='iframepage' frameBorder=0 scrolling=no onLoad='iFrameHeight()' ></iframe>
class: inverse, center, middle
问题解答
回答1:试试这个可以吗
function iFrameHeight() { document.getElementById('iframepage').style.height = window.frames[’iframepage’].document.documentElement.scrollHeight + ’px’;}
相关文章:
1. php - 第三方支付平台在很短时间内多次异步通知,订单多次确认收款2. html5 - h5写的app用的webview,用手机浏览器打开不显示?3. css3 - css before 中文乱码?4. mysql新建字段时 timestamp NOT NULL DEFAULT ’0000-00-00 00:00:00’ 报错5. javascript - 百度echarts series数据更新问题6. Mysql && Redis 并发问题7. css - 求推荐几款好用的移动端页面布局调试工具呢?8. mysql - 一个表和多个表是多对多的关系,该怎么设计9. javascript - webpack --hot 热重载无效的问题10. javascript - node服务端渲染的困惑
