How to make the text/id I give can be brought from the URL I am requesting

Solution 1:

Declare a variable for id first

let id = 0

document.getElementById("ide").addEventListener("onchange", function(e) {
    id = e.target.value
});

Your ajax function should be like this:

 function ajax() {
        const url = `https://jsonplaceholder.typicode.com/users/:${id}`;
    
        axios.get(url)
            .then((res) => {
                show(res.data)
            })
            .catch((err) => {
                console.log(data);
            })
    }