fuhonglin - 2013/3/26 22:03:30
这是选项卡的例子:
- <style type="text/css">
- .tabheadstyle{clear:both;height:20px;overflow:hidden;}
- .tabheadstyle dd{float:left;width:100px;height:20px;border:1px solid #cccccc;text-align:center;margin-right:5px}
- .tabheadstyle dd.current{background-color:#eeeeee;} /* 当前选项卡标题样式,默认名:current */
- .tabcontentstyle dd{border:1px solid #cccccc;padding:10px;display:none;}
- </style>
- <dl id="tabhead" class="tabheadstyle">
- <dd>选项1</dd>
- <dd>选项2</dd>
- <dd>选项3</dd>
- </dl>
- <dl id="tabcontent" class="tabcontentstyle">
- <dd>内容1</dd>
- <dd>内容2</dd>
- <dd>内容3</dd>
- </dl>
- <script type="text/javascript">
- tabs("tabhead","tabcontent","onmouseover");
- //tabs方法的简化调用(3个必填参数),前两个参数分别为标题和内容区的id,第三个参数可选onmouseover或onclick
- //完整参数调用写法(6个参数): tabs("tabhead","tabcontent","dd","dd","current","onmouseover")
- </script>
如上红色字所示,内容1、内容2、内容3要写什么?
xiyou - 2013/3/27 10:11:52
fuhonglin - 2013/3/27 10:55:54
原来如此,谢谢