How to display .html file in a web page preventing

2019-08-15 02:01发布

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.

0条回答
登录 后发表回答