response.data = <div id="login">Hi</div>
How to refer to the newly created element, let's say I inserted html code, a div appeared at the bottom of the page and I need to refer to it?
document.body.insertAdjacentHTML('beforeend', response.data)
thisModal = document.getElementById('login')