WEB前端开发群:17784629
<style> body{font-size:12px;} </style> <script> function SenFe_Code(sname,sid){ if(sid.style.display=="none"){ sid.style.display="block"; sname.innerText="隐藏"; }else{ sid.style.display="none"; sname.innerText="显示"; } } </script> <div OnClick="SenFe_Code(this,SenFe_1);">显示</div> <div id="SenFe_1" style="display:none;padding-left:30px;">详细内容一</div> <BR> <div OnClick="SenFe_Code(this,SenFe_2);">显示</div> <div id="SenFe_2" style="display:none;padding-left:30px;"> 详细内容二</div> <BR> <div OnClick="SenFe_Code(this,SenFe_3);">显示</div> <div id="SenFe_3" style="display:none;padding-left:30px;"> 详细内容三</div> <BR> <div OnClick="SenFe_Code(this,SenFe_4);">显示</div> <div id="SenFe_4" style="display:none;padding-left:30px;"> 详细内容四</div> <BR> <div OnClick="SenFe_Code(this,SenFe_5);">显示</div> <div id="SenFe_5" style="display:none;padding-left:30px;"> 详细内容五</div>
提示:你可以先修改部分代码再运行。
Posted in 前端特效.
Tagged with 显示, 隐藏.
No comments
By yflintao – 2010年07月28日
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
留下评论 Cancel Some HTML is OK
Name (required)
Email (required, but never shared)
Web
or, reply to this post via trackback.
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.