js代碼:var tpl = "<li>" +
"<span class='time'>" +
"<span class='kaishi'>" + timestart + "----</span>" +
"<span class='jieshu'>" + timeend + "</span></span>" +
"<span class='edit glyphicon glyphicon-edit'></span>" +
"<span class='delete glyphicon glyphicon-trash'></span>" +
"</li>";
$('#sometime').append(tpl);
$(".edit").click(function () {
alert(1);
});HTML效果:但是我點(diǎn)擊class = "edit" 的span 標(biāo)簽 不會觸發(fā)這個點(diǎn)擊事件... 也用過js的 就是不觸發(fā)... 大神求解決!
$().click事件觸發(fā)不了
RISEBY
2018-09-05 09:34:31