-1

我们有一个复选框列表作为来自 DHTMLX 的图像。

未选中

<td valign="middle" align="center" style="vertical-align: middle;" class="" title="">
   <img onclick="new eXcell_ch(this.parentNode).changeState(true); (arguments[0]||event).cancelBubble=true; " src="/dhtmlxGrid/codebase/imgs/item_chk0.gif" title="">
</td>

已检查

<td valign="middle" align="center" style="vertical-align: middle;" class="" title="">
  <img onclick="new eXcell_ch(this.parentNode).changeState(true); (arguments[0]||event).cancelBubble=true; " src="/dhtmlxGrid/codebase/imgs/item_chk1.gif" title="">
</td>

按钮(批量标记)

<input type="submit" onclick="DoRowBatch()" style="width:150px; background-color:darkslateblue;" class="formsubfree" value="Tag Selected Applications" id="ANSWER.TTQ.MENSYS.5." name="ANSWER.TTQ.MENSYS.5.">

单击复选框,他们可以转到下一步(批处理标签),如果没有,则需要弹出一个警报,说“选择至少一个复选框”

function DoRowBatch() {
   var Checkedlist = mygrid.getCheckedRows(15);
   if (CheckedList.checked){
      document.getElementById('ANSWER.TTQ.MENSYS.4.').value = Checkedlist;
      document.getElementById('ANSWER.TTQ.MENSYS.5.').click();
   }
   else
   { 
     alert ("You must first select applications, using the checkboxes, before bulk tagging them"); 
   }
}
4

1 回答 1

0
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>

<img onclick="new eXcell_ch(this.parentNode).changeState(true); (arguments[0]||event).cancelBubble=true; " src="/dhtmlxGrid/codebase/imgs/item_chk0.gif" title="">

<script type="text/javascript">

$(document).ready(function () 
{
    if($("img[src='/dhtmlxGrid/codebase/imgs/item_chk0.gif']").length > 0)
    {
        //show Popup
    }
});

</script>
于 2013-07-18T13:37:11.040 回答