6424 阅读
1 回复
0 点赞
0 收藏
<!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" /> <title>显示或隐藏左侧列表的html代码</title> <style type="text/css"> body {background:#FFFFFF;color:#000000;font-size:12px;margin:0px;height:100%;} img {border:none;} html {height:100%;} .side {background:url('side_bg.gif') repeat-y;width:180px;} .side_h {width:8px;background:url('side_hide.gif') no-repeat 0 280px;cursor:pointer;} .side_s {width:8px;background:url('side_show.gif') no-repeat 0 280px;cursor:pointer;} </style> <script type="text/javascript"> function Dd(i) {return document.getElementById(i);} function Ds(i) {Dd(i).style.display = '';} function Dh(i) {Dd(i).style.display = 'none';} function oh(o) { if(o.className == 'side_h') { Dh('side');o.className = 'side_s'; } else { Ds('side');o.className = 'side_h'; } } </script> </head> <body> <table width="100%" height="200" cellpadding="0" cellspacing="0"> <tr> <td valign="top" class="side" id="side">left</td> <td class="side_h" id="side_oh" title="显示隐藏开关"> </td> <td valign="top" class="main" id="main">right</td> </tr> </table> <script type="text/javascript"> if(document.body.clientHeight > Dd('main').scrollHeight) Dd('main').style.height=document.body.clientHeight+'px'; </script> </body> </html>
使用道具 举报
本版积分规则 发表回复 回帖并转播 回帖后跳转到最后一页
本文内容不够精彩,我要自己发布
|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )
GMT+8, 2025-1-16 03:30 , Processed in 0.172697 second(s), 28 queries .
Powered by Discuz! X3.5
Cpoyright © 2001-2025 Discuz! Team