Ajax - How refresh
after submit

前端 未结 5 1363
时光说笑
时光说笑 2020-11-30 10:57

How can I refresh just part of the page (\"DIV\") after my application releases a submit? I\'m use JQuery with plugin ajaxForm. I set my target with \"divResult\", but the p

5条回答
  •  失恋的感觉
    2020-11-30 11:02

    If you just want to refresh your div with the same static content that was in it before it was overridden by your post results, you can maybe try something like:

    $("#Container").html($("#Container").html());
    

    of course be careful that the inner HTML has not changed, or alternatively, you can store the innerHTML in a variable in the document.ready() function, then load it whenever you need to. Sorry, written in haste.

提交回复
热议问题