Jquery problem alert does not come out

I"d like to ask you why alert doesn"t come out when you write it like this. Click on it and it doesn"t respond

.
Mar.13,2021

Click the event into the ajax and put it after $(tbody) .html (str)


for the generated element, use on. Something like this:
/ / replace p with the element that the table puts in.
$("p"). On ("click", function () {
alert (1);
});
would be fine.


this is a dynamically added event. Either add $(tbody) .html (str) or use event delegate


because the binding event is executed first, but the ajax callback has not been executed at this time, and the target dom is not yet produced before the ajax callback function is executed. Just modify it as in the first comment

< hr class= "callback" >.

you bind the event first and then add elements to the page

$("tbody").on("click",".handle",function(){
    alert(1)
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaf9c8-226a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaf9c8-226a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?