Change HTML code without refreshing the page

后端 未结 5 1725
傲寒
傲寒 2021-01-14 02:52

Is there any possibility how to change HTML (.jsp) page without refreshing it?

Usecase is that user writes something to textarea then hits

5条回答
  •  时光说笑
    2021-01-14 03:57

    You should use the javascript function document.getElementById (DIV THAT YOU WOULD LIKE TO PLACE IN).innerHTML = YOUR_TEXT;.

    If you need a response from the server without reloading the page (you will still have to load, but the client will not notice), try using AJAX.

提交回复
热议问题