How to replace the entire html webpage with ajax response?

前端 未结 6 684
难免孤独
难免孤独 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 18:52

    If your response includes the and tags:

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

    If not, and it's only content, then do:

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

提交回复
热议问题