我想显示db表中的记录。我正在通过以下代码
执行此操作var db = window.openDatabase("DataBase", "3.6.22", "test", 200000);
db.transaction(function(transaction)
{
transaction.executeSql('SELECT * FROM FUND_DET WHERE POLICY_NUMBER="'+polno+'";',[],
function(transaction, result)
{
if (result != null && result.rows != null)
{
//alert("in if");
for (var i = 0; i < result.rows.length; i++)
{
var row = result.rows.item(i);
// document.getElementById('lb'+i).innerHTML=row.FUND_DESC;
var x=row.ALLOC_PERCNT;
// document.getElementById('t'+i).value=xx;
global[i]=row.FUND_DESC;
glob1=row.FUND_DESC;
$("#table").append("<tr><td>"+row.FUND_DESC+"</td><td><input type='text' id='t"+i+"' size='5' /></td><td><input type='text' size='5' /></td></tr>");
var x=$("#t"+i).val(); }
}
},errorHandler);
},errorHandler,nullHandler);
如上所示,我想为表标签中的输入标签分配id。所以后来我想使用id设置值或设置值。但是id不分配给输入标签。请告诉我如何动态分配id