标签:
页面详细信息的显示和隐藏
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <script type="text/javascript"> function show_detail(detail){ var p=document.getElementById(‘p‘); if(detail.open){ p.style.visibility="hidden"; }else{ p.style.visibility="visible"; } } </script> <details id="detail" onclick="show_detail(this)"> <summary>详细信息</summary> <p id="p" style="visibility:hidden">快要<mark>上课</mark>了,真的要上课了,确实要上课了,不好玩 </p> </details> </body> </html>
标签:
原文地址:http://my.oschina.net/dongdong11019/blog/509807