JS gets the IDS process analysis of the line number selected by the table view

This article mainly introduces the IDS process parsing of JS acquisition form view, which is very detailed in the text through the sample code. For everyone’s learning or work, it is necessary to refer to it.

Instantification array

Traversal selected line PUSH to array

converts the array Join into the segmentation string

 / * Get the selected IDS * / Function getDataGridSelectRowIDS (ID) {var ids = []; var rows = $ ('#' + id) .DataGrid ('GetSelections'). DataGrid ('GetSelections'). ); // Get the selected line, the specific acquisition method varies depending on the framework, VAR I = 0; I  <rows.length; i++){ //遍历行
      ids.push(rows[i].id); //将行数据id加入到数组中
    }
    var idsStr = ids.join(','); //将数组转换为以,分割的字符串
    //console.info(idsStr);
    //console.info(rows.length);
    return ids;
   } 
The above is all the contents of this article, I hope to everyone Learning is helpful, I also hope that you will support Tumi Clouds.

© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment