2
引導按鈕下拉內的更改事件不起作用。可能是什麼原因?如何解決這個問題?如何處理引導按鈕下拉內的點擊事件
下面是我的小提琴。我想激發一個複選框更改事件,但令人驚訝的是下面的代碼不會觸發。
http://jsfiddle.net/20hLtzvr/18/
$('#chk0').click(function()
{
alert('hello world');
});
引導按鈕下拉內的更改事件不起作用。可能是什麼原因?如何解決這個問題?如何處理引導按鈕下拉內的點擊事件
下面是我的小提琴。我想激發一個複選框更改事件,但令人驚訝的是下面的代碼不會觸發。
http://jsfiddle.net/20hLtzvr/18/
$('#chk0').click(function()
{
alert('hello world');
});
你忘了"
當您設置ID
更換
$('#citycountylist ul').append('<li><a href="#"><input type="checkbox" class="chk" id=' + 'chk' + index + ' />' + ' ' + json.NewYork[index].name + ' </a></li>');
通過
$('#citycountylist ul').append('<li><a href="#"><input type="checkbox" class="chk" id="' + 'chk' + index + '" />' + ' ' + json.NewYork[index].name + ' </a></li>');