我正在 asp.net 中开发讨论面板,其中我正在通过 javascripts 绘制一些跨度
$("#commenttr").after("<tr id="+i+"><td class=\"labelPortion\"></td><td class=\"controlPortion\">" +out[i]+ "</td><td><span style = \"cursor:pointer\" class = \"plblAgreeComment\" id = \"" + ids[i+1] + "\"> Vote Up </span> <span style = \"cursor:pointer\" class = \"plblDisAgreeComment\" id = \"" + ids[i+1] +"\">Vote Down </span><span id = \"ptxtAgreeComment\" >"+ agrees[i+1] + " </span></td></tr>");
但是当我调用 jquery 函数时
$(".plblAgreeComment").click(function(){
alert("hi");
}
它不工作。请帮我。