【发布时间】:2012-02-29 12:15:35
【问题描述】:
我正在使用以下代码将移动样式放在输入表单上:
items.push('<form id="flatmetrics"><table >');
for (i = 0; i < len; i += 1) {
row = resultflat.rows.item(i);
if (row.currentmetric == 0) {
items.push('<tr><td width="20%"><label for="' + row.flatno + '">' + row.flatdescription + '</td><td width="20%">' + row.previousmetric +'</label></td><td width="60%"><input type="number" name="' + row.flatno + '" id="' + row.flatno + '" flat="' + row.flatdescription + '" building="' + row.buildingcode + '" class="field" value="' + row.previousmetric + '"/></td></tr>');
}
else {
items.push('<tr><td width="20%"><label for="' + row.flatno + '">' + row.flatdescription + '</td><td width="20%">' + row.previousmetric +'</label></td><td width="60%"><input type="number" name="' + row.flatno + '" id="' + row.flatno + '" flat="' + row.flatdescription + '" building="' + row.buildingcode + '" class="field" value="' + row.currentmetric + '"/></td></tr>');
}
}
items.push('</table></form>');
$('#entriesflatFM').show();
$('#entriesflatFM').html(items.join('\n')).page();
第一次访问后,表单没有增强样式。
有人知道这是为什么吗?
【问题讨论】:
标签: jquery forms mobile jquery-mobile