Load external div content to my page div

后端 未结 1 803
轻奢々
轻奢々 2020-12-18 13:32

I am trying to load external website #external-div content to the page on #mydiv div. I have tried by attaching this jquery

1条回答
  •  长情又很酷
    2020-12-18 14:03

    try code bellow to get callback respon:

    $('#mydiv').load('http://localhost/qa/ask #external-div', function(response, status, xhr) {
        if (status == "error") {
            var msg = "Sorry but there was an error: ";
            alert(msg + xhr.status + " " + xhr.statusText);
          }
    });
    

    0 讨论(0)
提交回复
热议问题