用JScript实现MembersTable

在msdn online上讲解某个类的属性、方法、事件时,用到了一个MembersTable的表格。类似下图:


笔者研究其中的代码,经过简化也实现了这种效果,提供类似如下的 TABLE,通过JScript,能够自动生成类似上图的MembersTable:

<BLOCKQUOTE>
  <DIV id=oMTExplanation style="DISPLAY: none"></DIV>
  <DIV id=oMT>
    <P class=clsRef style="DISPLAY: none">属性</P>
    <DIV tabName="属性">
      <TABLE class=clsStd style="BACKGROUND: #ffffff" width="100%">
        <TBODY><TR>
          <TH>属性</TH>
          <TH>说明</TH>
        </TR>
        <TR>
          <TD>
            <NOBR>
              <A href="#">image</A>
            </NOBR>
          </TD>
          <TD>
            Sets or retrieves the DirectAnimation Image (DAImage class) displayed by the <B>anim:DA</B> element.
          </TD>
        </TR>
        <TR>
          <TD>
            <NOBR>
              <A href="#">sound</A>
            </NOBR>
          </TD>
          <TD>
            Sets or retrieves the DirectAnimation sound (<B>DASound</B> class) played by the <B>anim:DA</B> element.
          </TD>
        </TR>
        <TR>
          <TD>
            <NOBR>
              <A href="#">statics</A>
            </NOBR>
          </TD>
          <TD>
            Retrieves an object containing the <B>DAStatics</B> class library used with DirectAnimation.
          </TD>
        </TR>
      </TBODY></TABLE>
    </DIV>
 
    <P class=clsRef style="DISPLAY: none">方法</P>
    <DIV tabName="方法">
      <TABLE class=clsStd style="BACKGROUND: #ffffff" width="100%">
        <TBODY><TR>
          <TH>方法</TH>
          <TH>说明</TH>
        </TR>
        <TR>
          <TD>
            <NOBR>
              <A href="#">addDABehavior</A>
            </NOBR>
          </TD>
          <TD>
            Adds a DirectAnimation behavior (DABehavior class) to the run list when the behavior is not part of the animation model.
          </TD>
        </TR>
        <TR>
          <TD>
            <NOBR>
              <A href="#">removeDABehavior</A>
            </NOBR>
          </TD>
          <TD>
            Removes a DirectAnimation behavior (DABehavior class) added by the <B>addDABehavior</B> method.
          </TD>
        </TR>
      </TBODY></TABLE>
    </DIV>
  </DIV>
</BLOCKQUOTE>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值