$('#input').change(function () {
console.log($('#add'));
value = this.value;
if (this.value){
$('#add').append("<a name='key' class='btn btn-success fa fa-close'>"+this.value+"</a>");
}
});
$(document).on('click','a[name="key"]',function () {
console.log('点击了');
console.log(this);
this.remove();
});
因篇幅问题不能全部显示,请点此查看更多更全内容