HTML实现点击展开和收起
来源:互联网 发布:windows开发面试题 编辑:程序博客网 时间:2024/06/05 11:34
<!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" /><style type="text/css">#box,#box2,#box3,#box4{padding:10px;border:1px solid green;} </style><script type="text/javascript">//===========================点击展开关闭效果====================================function openShutManager(oSourceObj,oTargetObj,shutAble,oOpenTip,oShutTip){var sourceObj = typeof oSourceObj == "string" ? document.getElementById(oSourceObj) : oSourceObj;var targetObj = typeof oTargetObj == "string" ? document.getElementById(oTargetObj) : oTargetObj;var openTip = oOpenTip || "";var shutTip = oShutTip || "";if(targetObj.style.display!="none"){ if(shutAble) return; targetObj.style.display="none"; if(openTip && shutTip){ sourceObj.innerHTML = shutTip; }} else { targetObj.style.display="block"; if(openTip && shutTip){ sourceObj.innerHTML = openTip; }}}</script><title>无标题文档</title></head><body><p><a href="###" onclick="openShutManager(this,'box')">点击展开</a></p><p id="box" style="display:none"> 这里面放的是box的内容.</p><p><a href="###" onclick="openShutManager(this,'box2',true)">点击展开</a></p><p id="box2" style="display:none"> 这里面放的是box的内容.</p><p><a href="###" onclick="openShutManager(this,'box3',false,'点击关闭','点击展开')">点击展开</a></p><p id="box3" style="display:none"> 这里面放的是box的内容.</p><p><button onclick="openShutManager(this,'box4',false,'点击关闭','点击展开')">点击展开</button></p><p id="box4" style="display:none"> 这里面放的是box的内容.</p></body></html><a href="http://js.alixixi.com/">欢迎访问阿里西西网页特效代码站,js.alixixi.com</a>
转自:http://js.alixixi.com/read_80222_164.html
0 0
- HTML实现点击展开和收起
- 点击按钮,实现展开和收起
- 【HTML】- 实现展开与收起效果
- js实现菜单的收起和展开
- webView 收起和展开
- TextView展开和收起
- tableview实现单个cell的展开和收起
- 仿美团实现可展开和收起的LinearLayout
- 纯CSS3实现移动端展开和收起效果
- 展开收起内容实现代码
- JavaScript实现“展开-收起”效果
- UITableView 的展开和 收起
- cell的展开和收起
- 在datagrid里实现文章内容在点击标题的时候收起或者展开的效果
- html+css+js 简易展开收起效果
- javascript实现一段文字展开、收起(默认收起)
- 实现展开收起DIV的功能
- javascript实现文字隐藏 展开收起
- 在myeclipse中创建maven工程
- 大数据时代 PMC如何做“硬”迎接软件定义冲击
- HTML5 全屏 API
- validateJarFile jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/
- GDB 调试(三)
- HTML实现点击展开和收起
- php单态模式
- CString,string,char[],int相互之间的转换
- Vectrosity画线插件
- java泛型方法的使用
- 关于VS2013调试时main带命令行参数的问题
- IOS 退出程序APP代码
- GDB 调试(四)
- DM8168 DVRRDK开发总结