How to change font size of inline frames externally_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:20:40
Original
1519 people have browsed it

HTML frame font JavaScript




A
A
This text will change size immediately



This cannot change the font size in the inline frame. How can I change the font size in the inline frame?

Reply to discussion (solution)

<html><body bgcolor="#fffff"><script type="text/javascript">    function changeFontSize(size) {        var bd = document.getElementById('ifr').contentWindow.document.body;        bd.style.fontSize = size + "px";    }</script><a href="javascript:changeFontSize(14)" style="font-size:14px;" alt="Smaller Font Size">A</a><a href="javascript:changeFontSize(18)" style=" font-size:18px;" alt="Larger Font Size">A</a><div id=zoom>这段文字会随即改变大小</div><iframe id="ifr" src="2.html" height="500" width="999" align="center" scrolling="no" marginwidth="80" vspace="100"></iframe></body></html>
Copy after login

ok OK Thank you very much!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template