视图获取选择的记录行的ID
程序员文章站
2024-03-24 10:46:28
...
视图获取选择的记录行的ID
方法一:
var obj = viewcontent.form1.document;
$(obj).find("input[name='chk_sel']:checked").each(function() {
if(fileids != "") {
fileids += ",";
}
var FILEID = $(this).parent().parent().find("input[name='FILEID']").val();
fileids += "'" + FILEID + "'";
});
方法二:
function getSelectIDs(objfrmList)
{
var selectFileIDs = [];
try{
if (objfrmList.chk_sel == null){
return;
}
if (objfrmList.chk_sel.length>1){
for(i = 0;i<objfrmList.chk_sel.length;i++){
if (objfrmList.chk_sel[i].checked == true){
selectFileIDs.push(objfrmList.FILEID[i].value);
}
}
}else{
if (objfrmList.chk_sel.checked == true)
{
selectFileIDs.push(objfrmList.FILEID.value);
}
}
}catch(e){alertDialog(e);}
return selectFileIDs;
}
视图界面调用方法需传参数:viewcontent.document.form1
CopyTo(viewcontent.document.form1);
上一篇: eclipse中没有javaEE的透视图
下一篇: Eclipse插件开发Facet