20 lines
520 B
JavaScript
20 lines
520 B
JavaScript
const inputElement = document.getElementById('mytext');
|
|
const sendButton = document.getElementById('mybutton');
|
|
|
|
sendButton.addEventListener('click', () => {
|
|
const inputValue = inputElement.value;
|
|
console.log("inputValue:");
|
|
console.log(inputValue);
|
|
console.log(PLGNTLS_data);
|
|
PLGNTLS_data.ajax(inputValue, 'get_data')
|
|
.then((response) => response.json())
|
|
.then((data) => {
|
|
console.log("dataaa: ");
|
|
console.log(data);
|
|
})
|
|
.catch((error) => {
|
|
console.log("error: ");
|
|
console.log(error);
|
|
});
|
|
});
|