嗨,我卡住了,我需要将状态传递给Apply()函数。但是当我把Apply(“+ Status +”);进入for循环它似乎不工作。但是,如果状态等于某个数字,它就会起作用。请帮忙。这是我的代码。如何将Text参数传递给循环中的函数?
状态等于“完成,未完成”。
function querySuccess(tx, results, Type, Status, Amount, Years){
var len = results.rows.length;
var display = "";
display +="<table>";
display +="<tr>";
display +="<td>First Year Rate</td>";
display +="<td>Apply Now</td>";
display +="</tr>";
for (var i=0; i<len; i++){
display +="<tr>";
display +="<td>"+ results.rows.item(i).first_year+"</td>";
display +="<td><input type'button' onClick='Apply();' value='Apply'/></td>";
display +="</tr>";
}
display +="</table>";
}
感谢您的快速回复。但仍然无法工作。 – NOOPA 2013-03-01 08:22:38