嗨,我被困住了,我需要将状态传递给 Apply() 函数。但是当我把 Apply("+ Status +"); 进入 for 循环它似乎不起作用。但是,如果 Status 等于某个数字,它就可以工作。请帮忙。这是我的代码。
状态等于“完成,未完成”。
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>";
}