<SCRIPT LANGUAGE="JavaScript"> function f_frameStyleResize(targObj){ var targWin = document; if(targWin != null) { var HeightValue = targObj.document.body.scrollHeight if(HeightValue < 600){HeightValue = 600} targWin.style.pixelHeight = HeightValue; } } function f_iframeResize(){ bLoadComplete = true; f_frameStyleResize(self); } var bLoadComplete = false; window.onload = f_iframeResize; </SCRIPT>
建议用框架装载新的内容,然后框架高度自适应。
建议用框架装载新的内容,然后框架高度自适应。
var xmlhttp;
function Show(ID){
ev = document.getElementById(ID);
ev.style.border = "2px solid #74B7DE";}
function clear_win(ID){
ev = document.getElementById(ID);
ev.style.border = "2px solid #EEEEEE";
}
function get_Flash(ChkUrl,ID){
show_Win();createXMLHttpRequest();
url = ID+"/"+ChkUrl+".Xml";
xmlhttp.open("GET",url,true);
xmlhttp.onreadystatechange = innerFlash;
xmlhttp.send(null);//}function innerFlash(){
if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
if (window.DOMParser)
{
var Xmldoc = (new DOMParser()).parseFromString(xmlhttp.responseText,"text/xml");
var Xsldoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
Xsldoc.resolveExternals = false;
Xsldoc.async = false;
Xsldoc.load("../xsl/Flash_Beta_1_0.xsl");
}
else if (window.ActiveXObject)
{
var Xmldoc = new ActiveXObject("Msxml2.DOMDocument");
Xmldoc.async = false;
Xmldoc.load(xmlhttp.responseXml);
var Xsldoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
Xsldoc.resolveExternals = false;
Xsldoc.async = false;
Xsldoc.load("../xsl/Flash_Beta_1_0.xsl");
// create the xslt object
var xslt = new ActiveXObject("Msxml2.XSLTemplate");
xslt.stylesheet = Xsldoc;
var xslProc = xslt.createProcessor();
xslProc.input = Xmldoc;
xslProc.transform();
}
document.getElementById("Flash").innerHTML = Xmldoc.transformNode(Xsldoc);GoBack();
}}function createXMLHttpRequest() {//如果是IE,用activexobject
if (window.ActiveXObject) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} //如果其它浏览器就用XMLHttpRequest
else if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
}}
function show_Win(){
document.body.style.margin=0;
document.body.style.padding=0;
win = document.getElementById("test")win.style.visibility = "visible";win.style.height=document.body.scrollHeight+"PX";
small_win = document.getElementById("small_test");small_win.style.visibility = "visible";small_win.style.top = document.body.scrollTop+document.body.offsetHeight-400;
}function fixPos(){
small_win = document.getElementById("small_test");small_win.style.top = document.body.scrollTop;}
function GoBack(){
win = document.getElementById("test");
win.height = 0;
win.style.visibility = "hidden";
document.body.style.margin="";
document.body.style.padding="";
small_win = document.getElementById("small_test");
small_win.style.visibility = "hidden";
small_win.height = 0
var Ev = document.getElementById("Flash");
var bLoadComplete = false; window.onload = f_iframeResize; }function f_frameStyleResize(targObj){ var targWin = document; if(targWin != null) { var HeightValue = targObj.document.body.scrollHeight if(HeightValue < 600){HeightValue = 600} targWin.style.pixelHeight = HeightValue; } } function f_iframeResize(){ bLoadComplete = true;
Flash = document.getElementById("Flash")
f_frameStyleResize(Flash); }
document.write("<div id='test' style='position:absolute;visibility=hidden; background-color: #000000;width:100%;height:0px;line-height:100px;MozOpacity=0.5;-moz-opacity: 0.5;filter: Alpha(Opacity=50);'><div id='small_test' style='position:absolute;font-family: Tahoma, Verdana; font-size: 18px;top:50;left:500;visibility: hidden;'><IMG SRC='/images/wait.gif'><font color=#FFFFFF>Loading....</font></div></div>");</SCRIPT>