码迷,mamicode.com
首页 > 其他好文 > 详细

实现对div的显示隐藏

时间:2017-03-07 22:36:39      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:通过   style   article   ble   设置   代码   空间   isp   显示   

jQuery对div的显示和隐藏: 显示: 复制代码 代码如下: $("#id").show() 隐藏: 复制代码 代码如下: $("#id").show() js对div的显示和隐藏: div的visibility可以控制div的显示和隐藏,但是隐藏后页面显示空白 复制代码 代码如下: style="visibility: none;" document.getElementById("typediv1").style.visibility="hidden";//隐藏 document.getElementById("typediv1").style.visibility="visible";//显示 通过设置display属性可以使div隐藏后释放占用的页面空间,如下 复制代码 代码如下: style="display: none;" document.getElementById("typediv1").style.display="none";//隐藏 document.getElementById("typediv1").style.display="";//显示 来源:http://www.jb51.net/article/55696.htm

实现对div的显示隐藏

标签:通过   style   article   ble   设置   代码   空间   isp   显示   

原文地址:http://www.cnblogs.com/kongxc/p/6517016.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!