• 查看更多 详细介绍+点击收起 效果


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head>
    
    <body>
    
    
    
    <DIV id=soft_instr name="soft_instr">
    1<br />
    2<br />
    3<br />
    4<br />
    5<br />
    6<br />
    1111111111<br />
    22222222222<br />
    3333333333<br />
    444444444444<br />
    5555555555555<br />
    666666666666666666<br />
    
    
    </DIV>
    
    
    <DIV id=comm_1 name="comm_1"></DIV>
    <DIV id=comm_2 style="DISPLAY: none" name="comm_2"></DIV>    
    <DIV id=comm_3 style="DISPLAY: none;" name="comm_3">
        <SPAN>
            <INPUT onclick="this.value==='详细介绍'?this.value='点击收起':this.value='详细介绍';show_brief();" type=button value="详细介绍" name=botton>
        </SPAN>
    </DIV>
    
    
    <SCRIPT type=text/javascript> 
            document.getElementById('comm_1').innerHTML=document.getElementById('soft_instr').innerHTML; 
            document.getElementById('comm_2').innerHTML=document.getElementById('soft_instr').innerHTML; 
           
           function show_brief(){
                var obj1=document.getElementById('comm_1');
                var obj2=document.getElementById('comm_2');
                if(obj1.style.display==""){
                    obj1.style.display="none";       
                    obj2.style.display="";   
                     obj2.innerHTML=document.getElementById('soft_instr').innerHTML;
                }else{
                    obj2.style.display="none";
                    obj1.style.display="";
                     obj1.innerHTML=document.getElementById('soft_instr').innerHTML; 
                }
                
           }
                
                 var _h=document.getElementById('comm_1').offsetHeight;
                  document.getElementById('soft_instr').style.display="none";
     
                if(_h > 200){
                    document.getElementById('comm_1').style.height="107px";
                    document.getElementById('comm_1').style.overflow="hidden";
                    document.getElementById('comm_3').style.display="block";
                }
               
        </SCRIPT>
    
    
    </body>
    </html>
  • 相关阅读:
    深入理解关系型数据库的数据水平切分和垂直切分
    数据库Sharding的基本思想和切分策略
    Mycat 设置全局序列号
    Spring MVC异常统一处理
    spring配置文件中bean标签
    浅析VO、DTO、DO、PO的概念、区别和用处
    CentOS7.0安装Nginx 1.7.4
    大数据的四大特点
    CentOS 7 上安装 redis3.2.3安装与配置
    CentOS7下安装MySQL5.7安装与配置(YUM)
  • 原文地址:https://www.cnblogs.com/visi_zhangyang/p/2549708.html
Copyright © 2020-2023  润新知