ajax script is automatically added when a script is added
This commit is contained in:
@@ -3,8 +3,6 @@ const title = document.querySelector(".first_el_to_change");
|
||||
title.innerHTML = "--- coucou ;) " + myvar_1;
|
||||
|
||||
const ajax_button_1 = document.querySelector("#test_ajax_1");
|
||||
console.log("ajax_button_1: ");
|
||||
console.log(ajax_button_1);
|
||||
ajax_button_1.addEventListener('click', () => {
|
||||
ajax_post(ajax_button_1, 'get_data');
|
||||
});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
const title3 = document.querySelector(".third_el_to_change");
|
||||
title3.innerHTML = "--- bye bye, " + myvar_2;
|
||||
console.log(myvar_2);
|
||||
|
||||
Reference in New Issue
Block a user