繁体   English   中英

用来自AJAX请求的内容填充Bootstrap模式

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM