Javascript 使用来自AJAX请求的内容填充引导模式

Javascript 使用来自AJAX请求的内容填充引导模式,javascript,jquery,ajax,Javascript,Jquery,Ajax,这是我调用文件shipper_modal.html文件的代码。我想通过AJAX请求调用它,并将响应放入引导模式。这是行不通的 $('.modalLink1').click(function() { $.ajax({ url: "shipper_modal.html", cache: false: function(result) { $(".modal-content").html(result); })

这是我调用文件shipper_modal.html文件的代码。我想通过AJAX请求调用它,并将响应放入引导模式。这是行不通的

$('.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);
  }});           
});
试试这个:

$('.modalLink1').click(function(){
  $.ajax({
    url: "shipper_modal.html",
    cache: false,
    success: function(result) {
      $(".modal-content").html(result);
  }});           
});

检查控制台以查看错误,然后参阅以查看其语法应该是什么样子检查控制台以查看错误,然后参阅以查看其语法应该是什么样子