Copy Code code as follows:
function Setiframeheight (down) {
var Sys = {};
var ua = Navigator.userAgent.toLowerCase ();
var s;
(s = Ua.match (/msie) ([\d.] +)/)) ? sys.ie = S[1]:
(s = Ua.match (/firefox\/) ([\d.] +)/)) ? Sys.firefox = S[1]:
(s = Ua.match (/chrome\/) ([\d.] +)/)) ? Sys.chrome = S[1]:
(s = Ua.match (/opera.) ( [\d.] +)/)) ? Sys.opera = S[1]:
(s = Ua.match (/version\/) ([\d.] +). *safari/)? Sys.safari = S[1]: 0;
var ptar = null;
if (document.getElementById) {
Ptar = document.getElementById (down);
} else {
Eval (' ptar= ' + Down + '; ');
}
PTar.style.display = "block";
if (sys.ie) {
if (sys.ie = = ' 9.0 ') {
Ptar.height = pTar.contentWindow.document.body.offsetHeight + + "px";
Ptar.width = pTar.contentWindow.document.body.scrollWidth + "px";
else if (sys.ie = ' 8.0 ') {
Debugger
Ptar.height = pTar.Document.body.offsetHeight + + "px";
Ptar.width = pTar.Document.body.scrollWidth + "px";
} else {
Ptar.height = pTar.Document.body.scrollHeight + + "px";
Ptar.width = pTar.Document.body.scrollWidth + "px";
}
}
if (Sys.firefox) {
Ptar.height = pTar.contentDocument.body.offsetHeight + + "px";
Ptar.width = pTar.contentDocument.body.scrollWidth + "px";
}
if (sys.chrome) {
Ptar.height = PTar.contentDocument.body.offsetHeight;
Ptar.width = PTar.contentDocument.body.scrollWidth;
}
if (Sys.opera) {
Ptar.height = PTar.contentDocument.body.offsetHeight;
Ptar.width = PTar.contentDocument.body.scrollWidth;
}
if (Sys.safari) {
if (pTar.contentDocument.body.offsetHeight <= ' 186 ') {
Ptar.height = PTar.contentDocument.body.offsetHeight + 10;
} else {
Ptar.height = PTar.contentDocument.body.offsetHeight;
}
Ptar.width = PTar.contentDocument.body.scrollWidth;
}
}
function Setiframeheight (down) {
var Sys = {};
var ua = Navigator.userAgent.toLowerCase ();
var s;
(s = Ua.match (/msie) ([\d.] +)/)) ? sys.ie = S[1]:
(s = Ua.match (/firefox\/) ([\d.] +)/)) ? Sys.firefox = S[1]:
(s = Ua.match (/chrome\/) ([\d.] +)/)) ? Sys.chrome = S[1]:
(s = Ua.match (/opera.) ( [\d.] +)/)) ? Sys.opera = S[1]:
(s = Ua.match (/version\/) ([\d.] +). *safari/)? Sys.safari = S[1]: 0;
var ptar = null;
if (document.getElementById) {
Ptar = document.getElementById (down);
} else {
Eval (' ptar= ' + Down + '; ');
}
PTar.style.display = "block";
if (sys.ie) {
if (sys.ie = = ' 9.0 ') {
Ptar.height = pTar.contentWindow.document.body.offsetHeight + + "px";
Ptar.width = pTar.contentWindow.document.body.scrollWidth + "px";
else if (sys.ie = ' 8.0 ') {
Debugger
Ptar.height = pTar.Document.body.offsetHeight + + "px";
Ptar.width = pTar.Document.body.scrollWidth + "px";
} else {
Ptar.height = pTar.Document.body.scrollHeight + + "px";
Ptar.width = pTar.Document.body.scrollWidth + "px";
}
}
if (Sys.firefox) {
Ptar.height = pTar.contentDocument.body.offsetHeight + + "px";
Ptar.width = pTar.contentDocument.body.scrollWidth + "px";
}
if (sys.chrome) {
Ptar.height = PTar.contentDocument.body.offsetHeight;
Ptar.width = PTar.contentDocument.body.scrollWidth;
}
if (Sys.opera) {
Ptar.height = PTar.contentDocument.body.offsetHeight;
Ptar.width = PTar.contentDocument.body.scrollWidth;
}
if (Sys.safari) {
if (pTar.contentDocument.body.offsetHeight <= ' 186 ') {
Ptar.height = PTar.contentDocument.body.offsetHeight + 10;
} else {
Ptar.height = PTar.contentDocument.body.offsetHeight;
}
Ptar.width = PTar.contentDocument.body.scrollWidth;
}
}