const inputElement = document.getElementById('mytext'); const sendButton = document.getElementById('mybutton'); sendButton.addEventListener('click', () => { const inputValue = inputElement.value; console.log("inputValue:"); console.log(inputValue); ajax_post(inputValue, 'get_data'); });