Home > Web Front-end > JS Tutorial > JavaScript processing Iframe adaptive height (under the same or different domain names)_javascript skills

JavaScript processing Iframe adaptive height (under the same or different domain names)_javascript skills

WBOY
Release: 2016-05-16 17:38:58
Original
1488 people have browsed it
1. Processing of Iframe adaptive height under the same domain name
Copy the code The code is as follows:




Tail




iframe nested page iframe.html
Copy code The code is as follows:



Iframed page


Text< ;br />









Text





< ;br />



Text









Text










< ;script type="text/javascript">
function sethash(){
hashH = document.documentElement.scrollHeight;
urlC = "agent.html";
document.getElementByIdx("iframeC ").src=urlC "#" hashH;
}
window.onload=sethash;




iframe intermediary page agent.html
Copy code The code is as follows:

< ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

iframe intermediary page


Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template