html5 - 如何用div語法在一個html里插入另外一段html(或者文件)代碼并完整顯示
問題描述
這個是寫出來的效果
這個是原圖html效果
<iframe src='http://m.cgvv.com.cn/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='http://m.cgvv.com.cn/wenda/zh-CN.css' type='text/css' />
</head> <body>
<textarea id='source'>
class: center, middle, inverse, title-slide
data123<iframe src='http://m.cgvv.com.cn/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. android - NavigationView 的側滑菜單中如何保存新增項(通過程序添加)2. 編程學習心得分享(共80條)3. php - 第三方支付平臺在很短時間內多次異步通知,訂單多次確認收款4. python-mysqldb - 這樣結構的mysql表,如何快速update5. 老師 我是一個沒有學過php語言的準畢業生 我希望您能幫我一下6. ueditor上傳服務器提示后端配置項沒有正常加載,求助!!!!!7. 提示語法錯誤語法錯誤: unexpected ’abstract’ (T_ABSTRACT)8. php - sql查詢結果合并的問題9. php7.3.4中怎么開啟pdo驅動10. tp5 不同控制器中的變量調用問題
