加载外部内容的jQuery代码

$("#content").load("fileoutside.html", function(response, status, my) {

  // error handling

  if(status == "error") {

    $("#content").html("An error occured: " + my.status + " " + my.statusText);

  }

});

编程技巧