How to replace the entire html webpage with ajax response?

前端 未结 6 691
难免孤独
难免孤独 2020-12-01 18:38

Before going to the specific question I need to explain a few basic steps.

First, the application in question deals with the management of appointments online by cus

6条回答
  •  温柔的废话
    2020-12-01 19:08

    I don't have enough reps to leave a comment (!!) but the UPDATE answer by @fribu-smart-solutions (https://stackoverflow.com/a/33914275/1428972) should be marked as the correct one, using:

    $("html").html($("html", response).html());
    

    This fully replaces the page via ajax. This does the job properly whereas others even using "html" doesn't fully work.

    I know this is an old post but it just solved my problem on the same issue! :)

提交回复
热议问题