2

我正在尝试为每个复选框添加标题CheckedMultiSelect

创建代码CheckedMultiSelect

<select id="123" class="soria" dojoType="dojox.form.CheckedMultiSelect" 
        multiple="true" style="width:267px; height:260px;" onchange=""
        store="listStore">
</select>

listStore来自dojo.data.ItemFileReadStorejson。

任何想法如何为复选框添加标题?

UPD。最后,我收到了这样的 HTML 代码(多选的单个元素的源代码):

<div aria-selected="false" widgetid="dojox_form__CheckedMultiSelectItem_4"
     id="dojox_form__CheckedMultiSelectItem_4" 
     class="dijitReset dojoxMultiSelectItem">

      <div widgetid="dijit_form_CheckBox_4" role="presentation" 
            class="dijitReset dijitInline dojoxMultiSelectItemBox dijitCheckBox" 
            wairole="presentation">

        <input aria-pressed="false" style="-moz-user-select: none;" 
        tabindex="0" id="dijit_form_CheckBox_4" value="on" 
        class="dijitReset dijitCheckBoxInput" dojoattachpoint="focusNode"
        dojoattachevent="onmouseover:_onMouse,onmouseout:
                         _onMouse,onclick:_onClick" 
        type="checkbox">

      </div>

      <div class="dijitInline dojoxMultiSelectItemLabel" 
            dojoattachpoint="labelNode" dojoattachevent="onmousedown:_onMouse,
                    onmouseover:_onMouse,onmouseout:_onMouse, onclick:_onClick">
            MICHAEL, DOPHINE
      </div>
</div>

问题:我怎样才能让道场为这个元素设置唯一的标题?

4

1 回答 1

0

您可以添加一个脚本,之后更改标题,例如

<script>
var o = document.getElementsByTagName('input');

for(var x in o){
   // check if o[x].name is one of these and then
   // do something with o[x].title ...
}
</script>
于 2012-07-23T13:14:16.817 回答