-----------下面保存为admin_main.asp--------------
给你贴一段代码,不过很少用iframe了,都用DIV了,你可以去搜索“可开关的iframe”
function switchSysBar(){
if (parent.document.getElementById('attachucp').cols=="160,10,*"){
document.getElementById('leftbar').style.display="";
parent.document.getElementById('attachucp').cols="0,10,*";
}
else{
parent.document.getElementById('attachucp').cols="160,10,*";
document.getElementById('leftbar').style.display="none"
}
}
function load(){
if (parent.document.getElementById('attachucp').cols=="0,10,*"){
document.getElementById('leftbar').style.display="";
}
}