在过去的几天里,我遇到了一个问题,我的网站上有一个这样的 iframe:
<iframe src ="http://hokuco.com/cde/user.txt" id ="myIframe"></iframe>
但是,consolas 看起来太旧了,使我的网站看起来像 80 年代的计算机终端。我试过在 iframe 周围使用字体标签,也试过更改字体类型,有什么方法可以将 iframe 文本从 consolas 更改为 arial?
最佳答案
使用 PHP:
PHP
<p><?php echo file_get_contents('http://hokuco.com/cde/user.txt'); ?></p>
使用 JQuery:
HTML:
<p id="text"></p>
JQuery:
$('#text').load("http://hokuco.com/cde/user.txt");
关于html - 如何在 iframe 中更改 txt 文件的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35102784/