2014-09-11 88 views

回答

2

你忘了"當您設置ID

更換

$('#citycountylist ul').append('<li><a href="#"><input type="checkbox" class="chk" id=' + 'chk' + index + ' />' + '&nbsp;' + json.NewYork[index].name + ' </a></li>'); 

通過

$('#citycountylist ul').append('<li><a href="#"><input type="checkbox" class="chk" id="' + 'chk' + index + '" />' + '&nbsp;' + json.NewYork[index].name + ' </a></li>');