I'm trying to figure out how to pass variables from JavaScript to a textbox. I have a variable in JavaScript but I am unsure how to transfer it to the textbox. I have heard that using AJAX makes it easy, but I don't know how to implement it. I thought AJAX was just for preventing reloads, so how can I achieve this? I read that I need to use GET and POST, but I am unsure how to do so. For example, I have the following code:
function guardar() {
var completo = "hello world";
}
How can I extract the variable completo
and pass it into a textbox?