获取复选框值的最简单方法是什么?我动态创建我的复选框
function buildList() {
var output;
output = "<form><fieldset data-role='controlgroup' data-iconpos='right' id='fieldset_item'>";
if (codeCounter != 0 && codeCounter > 0 && codeCounter != null) {
for (var i = 0; i < codeCounter; i++) {
output += "<input type='checkbox' name='checkbox_" + i
+ "' id='checkbox_" + i + "'><label for='checkbox_" + i
+ "'>" + localStorage.getItem(i) + "</label>";
}
}
output += "</fieldset></form>";
$(output).appendTo("#fieldSet");
$('#fieldSet').trigger("create");
}
那么我怎样才能得到每个复选框的值呢?