在页面中如何向不同列中添加内容
单击增加的时候,获得了焦点,在第一列中输入内容,完成后鼠标单击下一列,即可在下一列中输入内容,页面是JSP写的,通过调用JS方法实现,请问如后实现这样的功能?
function newRecord1()
{
addRow = datagrid_table.insertRow();
alert(1)
addRowIndex = addRow.rowIndex;
addCell1 = addRow.insertCell();
alert(addCell1);
addCell1.innerHTML="<input type='text' id='AddHTCsmdCodetype' class='eftText' value='' />"; //增加代码
addCell1.innerHTML="<input type='text' id='AddHTCsmdCodetypeName' class='eftText' value=''/>"; //增加名称
addCell1.innerHTML="<input type='text' id='AddHTCsmdSubsysCodetype' class='eftText' value='' />"; //增加组件代码
document.all('addHTCsmdtype').focus();
document.all('AddHTCsmdCodetypeName').focus();
document.all('AddHTCsmdSubsysCodetype').focus();
}
无法实现功能