jquery append external html file into my page

后端 未结 5 504
长发绾君心
长发绾君心 2020-12-02 14:48

I\'m trying to append an external html content (div plus some text inside just for testing) this way:

$.get(\"banner.html\", function(data){
    $(this).chil         


        
5条回答
  •  醉话见心
    2020-12-02 15:09

    You can use jquery's load function here.

    $("#your_element_id").load("file_name.html");
    

    If you need more info, here is the link.

提交回复
热议问题