[英]Fill Bootstrap modal with content from AJAX request
这是我的代码,称为文件shipper_modal.html文件。 我想通过AJAX请求来调用它,并将响应放入Bootstrap模态中。 这是行不通的。
$('.modalLink1').click(function() {
$.ajax({
url: "shipper_modal.html",
cache: false:
function(result) {
$(".modal-content").html(result);
})
})
提前致谢
尝试这个:
$('.modalLink1').click(function(){
$.ajax({
url: "shipper_modal.html",
cache: false,
success: function(result) {
$(".modal-content").html(result);
}});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.