0
無法從插入的模態html中進行選擇。 dispatchBody不會」選擇或插入jquery從插入的html中選擇
success: function (response) {
var result = omac.getJson(response);
if (result.status.msg == "Success.") {var html = '<div class=\"modal right fade\" id=\"referenceModel\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\"> <div class=\"modal-dialog\" role=\"document\"> <div class=\"modal-content\"> <div class=\"modal-header\" style=\"background-color: #428bca;color:#fff;\"> <button type=\"button\" class=\"close\" id=\"btnCloseModel\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">×<\/span><\/button> <h4 class=\"modal-title\" id=\"myModalLabel\">Reference Center<\/h4> <\/div> <div class=\"modal-body dispatchBody\"> <\/div> <div class=\"modal-footer\"> <button type=\"button\" class=\"btn btn-primary\" data-dismiss=\"modal\">CLOSE<\/button><\/div><\/div><\/div><\/div>';
$(html).after(".mainBody");
$('.dispatchBody').html(result.results.html);
}}
首先'if(result.status.msg =「Success。」)'是一個賦值,你可能需要==。否則,請嘗試給出更多關於你想要做什麼的細節 –
不理解問題。也許你可以創造一個龐然大物? – Knostradamus