var name = "ext_col_02[0][]";
这有效
j$( "input[name='ext_col_02[0][]']" ).change(function() {
console.log("I am called!");
});
但这不是
无法确定这里遗漏的内容。
function fillData(data, select_id) {
j$(select_id).children().remove();
var name = j$(select_id).attr('name');
name = name + "[]";
if(display_checkbox){
j$( "input[name='"+name+"']" ).change(function() {
console.log("I am called!");
});
j$.each(data, function(key, value){
j$(select_id).append('<input type="checkbox" name="'+name+'" value="'+ key +'">' + value + '</input>');
});
}else if(display_checkbox === undefined){
j$(select_id).append('<option value="">{/literal}{'/label/no_select'|translate}{*選択なし*}{literal}</option>');
j$.each(data, function(key, value){
j$(select_id).append('<option value="'+ key +'">' + value + '</option>');
});
}
j$(select_id).trigger('change',[true]);
}
动态添加元素。
感谢任何帮助,谢谢!