1. 单独在浏览器中查看 Template_V10.mht文件正常显示(该文件由excel另存成的)
2. 通过js把它加载到iframe中,有的浏览器无内容显示,有的浏览器提示“下载”
目标:通过js动态把.mht文件加载到iframe中主要代码如下:
<body>
<button onclick="asd()"></button>
<div title="mht">
<iframe style="POSITION: absolute;z-index: -1; width:100%;height:100%;" id="DivReport3"
></iframe>
</div>
</body>
</html>
<script type="text/javascript">
function asd() {
var ifra = document.getElementById("DivReport3");
ifra.src = "Template_V10.mht";
}
</script>iframe js mht
2. 通过js把它加载到iframe中,有的浏览器无内容显示,有的浏览器提示“下载”
目标:通过js动态把.mht文件加载到iframe中主要代码如下:
<body>
<button onclick="asd()"></button>
<div title="mht">
<iframe style="POSITION: absolute;z-index: -1; width:100%;height:100%;" id="DivReport3"
></iframe>
</div>
</body>
</html>
<script type="text/javascript">
function asd() {
var ifra = document.getElementById("DivReport3");
ifra.src = "Template_V10.mht";
}
</script>iframe js mht
解决方案 »
- 【求助】控件响应导致Page_Load重新加载。。。。。。。。。。。。标题要长
- asp.net+flash批量上传图片
- 有点难度的切割表格问题,在线等...
- 服务器控件LISTBOX,在脚本中我把值修改了,如何在后面CS代码中获取到修改后的值?
- 本人通常问简单问题,怎么自动跳转啊?
- IEWebControl安装的步骤是怎么样的啊
- Web控件中如何写其他Web控件的ClientID
- 1.txt,10.txt ,2.txt,3txt 排序
- asp.net 怎样让gridview的分页控件一直显示
- 新手请教dll反编译后的问题
- vs2010发布的网站不能访问数据库
- .net页面与flash配合完成摄像头截取头像的功能?
http://en.wikipedia.org/wiki/MHTML
<button onclick="asd()"></button>
<div title="mht" id="mhtFrame">
<iframe style="POSITION: absolute;z-index: -1; width:100%;height:100%;" id="DivReport3"
></iframe>
</div>
</body>
</html>
<script type="text/javascript">
function asd() {
var div = document.getElementById("mhtFrame");
div.innerHTML = '<iframe style="POSITION: absolute;z-index: -1; width:100%;height:100%;" id="DivReport3" src="Template_V10.mht" ></iframe>';
}
</script>