How to display .html file in a web page preventing downloading

ぃ、小莉子 提交于 2019-12-11 04:46:07

问题


I want to display the myfile.html file in a web page using the iframe tag, but, instead of displaying the contents of the my.html file, the browser downloads the file on the local computer. What should I change in order to make the contents viewables by preventing downloading? I also test both embed and object tag but the result remains the same. The code has as follow:

<iframe src="myfile.html"></iframe>
or
<embed src="myfile.html">
or
<object width="400" height="400" data="myfile.html"></object>

Mention: My intention, of course, is to use just one of the above tags, not all them.

来源:https://stackoverflow.com/questions/28988729/how-to-display-html-file-in-a-web-page-preventing-downloading

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!