var new_row=table3.insertRow(table3.rows.length);
var new_col=new_row.insertCell(0);
new_col.align="center";
new_col.innerHTML="<iframe name='I1' id='sel"+row_index+"' width='90%' height='50'></iframe>";
现在想定义Innerhtml下id为'sel"+row_index+"'的属性,怎么实现?
innerHTML
------解决方案--------------------
什么意思 ?
------解决方案--------------------
var new_row=table3.insertRow(table3.rows.length);
var new_col=new_row.insertCell(0);
new_col.align="center";
var iframe = document.createElement('iframe');
iframe.name = 'I1';
iframe.id='sel'+row_index;
iframe.width='90%';
iframe.height='50';
iframe.src='xxxxx';
new_col.appendChild(iframe);