ajax script is automatically added when a script is added

This commit is contained in:
asus
2024-02-11 18:17:05 +01:00
parent 87a0f7fc0b
commit 322e440422
6 changed files with 94 additions and 48 deletions

View File

@@ -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');
});

View File

@@ -1,4 +1,3 @@
const title3 = document.querySelector(".third_el_to_change");
title3.innerHTML = "--- bye bye, " + myvar_2;
console.log(myvar_2);