search

Home  >  Q&A  >  body text

javascript - How to clear the data returned by the previous request when using ajax to request data

When requesting data with ajax, the returned data is appended to the dom. When the next ajax request is made, the returned data will be superimposed with the data returned for the first time. Do you have any good methods to solve this kind of multiple requests? Data overlay problem?

天蓬老师天蓬老师2732 days ago775

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-31 10:41:23

    Did you use append? Then replace it with the .html() method

    reply
    0
  • Cancelreply