Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js div html add

document.addEventListener("DOMContentLoaded", function() {
    const xmlHttp = new XMLHttpRequest(),
        div = document.getElementById('music_all_ajax');
    xmlHttp.open("GET", '{{ route('music ') }}', false); // false for synchronous request
    xmlHttp.send(null);

    div.insertAdjacentHTML('afterbegin', xmlHttp.responseText);
});
 
PREVIOUS NEXT
Tagged: #js #div #html #add
ADD COMMENT
Topic
Name
5+8 =