DHTMLX TabBar

本文介绍了一种无需编写JavaScript代码即可初始化TabBar的方法。只需在页面中包含htmlxtabbar_start.js并为包含TabBar的div元素指定类名'dhtmlxTabBar'。文中详细列举了用于配置TabBar外观和行为的各种属性。

Initialize TabBar Object from HTML Structure

Without Javascript code: You do not need to write a line of javascript code if you include dhtmlxtabbar_start.js into the page. All you need is to specify class=“dhtmlxTabBar” of the div element which is container for the tabbar, and tabbar object will be initialized inside automatically.

<script  src="../codebase/dhtmlxcommon.js"></script>
<script  src="../codebase/dhtmlxtabbar.js"></script>
<script  src="../codebase/dhtmlxtabbar_start.js"></script>
<div id="a_tabbar" class="dhtmlxTabBar" imgpath="../codebase/imgs/" style="width:390; height:390;"  skinColors="#FCFBFC,#F4F3EE" >
    <div id="a1" name="Tab 1">Content 1</div>
    <div id="a2" name="Tab 2">Content 2</div>
    <div id="a3" name="Tab 3">Content 3</div>
</div>

Container DIV attributes to use:

  • mode - tabbar orientation - top/bottom/left/right;
  • tabheight - height of tab (not tab content);
  • imgpath - path to folder with tabbar images;
  • margin - space between tabs;
  • align - tabs align - right/left;
  • offset - offset of first tab from edge;
  • tabstyle - one of predefined styles: winDflt, winScarf, winBiScarf, winRound;
  • select - id of selected tab;
  • skinColors - list of two background colors - for active(1) and other tabs(2), like ”#ffdead,#f5fffa”;
  • style - you should specify width and height of tabbar area (with content).

Tab DIVs attributes to use:

  • id - identifier of tab;
  • name - tab label;
  • width - width of tab in pixels;
  • href - url of tab content;
  • row - row index;
  • onbeforeinit - action called exactly before tabbar creation ( samples/tab_content_auto3.html );
  • oninit - action called exactly after tabbar creation ( samples/tab_content_auto3.html ).

In this case the content of the tab should be placed inside tab DIV tags.

 

 

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值