我希望下面的代码向表格表单
添加新行,并将焦点移至(添加的行)上的第一个单元格例如(#f02_0003)
:
apex.widget.tabular.addRow();
for (i=1;i<100;i=i+1)
// to loop all existing row in order to get the new added row id
{
if( $('#f02_'+('000'+i).slice(-4)).length()>0 )
// to check whether the row with looped id exists or not
{
continue;
}
else
{
$('#f02_'+('000'+(i-1)).slice(-4)).focus();
// to focus the expected added row
break;
}
}
它添加新行但是永远不要聚焦任何单元格。
请帮忙!..
最佳答案
删除循环。然后添加以下行(假设第一列下的元素名称为“f02”):
$("[name='f02']").last().focus();
关于javascript - 甲骨文 APEX |如何以表格形式聚焦最后添加的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39316429/