IFrame Frame set left-right shrink hide

Source: Internet
Author: User

此例心得 对于td隐藏之类的写法,不要用display:block ---display:none,来进行,用这种写法style.display='';style.display:none;不然在firefox有点问题。。有兴趣的人可以测试下。将上面的代码那个display:“”,改在display="block"试试。。。边样子比较保险些

对于div之类的。。推荐用
style.display='block';
style.display='none';


兼容ie.firefox

以下是引用片段:
<script language="javascript">
function switchSysBar(){
//var dd=document.getElementById("dd");
//var  cc=(screen.availHeight)/2;
//dd.style.marginTop=cc+"px";
//alert(cc);
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="";
}
}
</script>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.