div点击隐藏和展示代码

星期一, 2014-04-21 | Author: Lee | html5, pagemaker | 4,031 views

直接上代码了:

<script type="text/javascript">
    function showorhiddenme(){
        var t_div = document.getElementById("test");
        if (t_div.style.display == "block") {
            t_div.style.display = "none";
        } else if (t_div.style.display == "none") {
            t_div.style.display = "block"
        }
    } 
</script>

Tags:

文章作者: Lee

本文地址: https://www.pomelolee.com/1317.html

除非注明,Pomelo Lee文章均为原创,转载请以链接形式标明本文地址

No comments yet.

Leave a comment

Search

文章分类

Links

Meta