Wordpress Ajax how to insert a piece of code?

Hi!
Please explain how to insert result of ajax request in some kind of block on the page. There is a handler in functions.php the ajax request in a separate file that is connected by using wp_enqueue_script and wp_localize_script in that piece of code where I need to dynamically modify elements. In the query through the console.log it displays a test string that I wrote in the handler via echo. Through document.write outputs the same string, but on a new blank page as if nothing works. I missed something, apparently, asking for help.
P. S. there are No data on the tracking yet do not send, I want to understand why nothing is displayed in the right place.
June 10th 19 at 14:22
0 answer

Find more questions by tags WordPress