I have a table created in javascript. On each row i am adding a checkbox. On checking the checkbox a warning message has to be displayed. how to add the oncheck attribute to a dynamic checkbox in javascript.
var tblRow = "<tr><td Style='display: none'>" + data.IxDetails
"</td><td>" + data.Name +
"</td><td>" + GroupTable +
"</td><td>" + (data.AllowFileAttachment == true ? "Yes" :"No" ) +
"</td><td>" + (data.SetToInActive == true ? "INACTIVE" : "ACTIVE" ) +
"</td><td><input type = 'checkbox' id='" +
data.Index + "' name='selectedData' value='123' "+
"</td><td><input type = 'checkbox' id='dl" +
data.Index + "' name='selectedData' value='123' >" +
"</td></tr>";
$('#DataTable> tbody:last').append(tblRow);