I have a question about a code that is killing me ...
What I need is that I copy the input value in another input, but that it is different, that is to say without spaces and in minuscule everything, example:
Input 1: Hello World Input 2: helloworld (or hello_world )
To copy what is written in Input 1 in Input 2 but in lowercase, without spaces or with a hyphen under
The code I have is the following:
CODE JS:
document.getElementById("name").addEventListener('keyup', autoCompleteNew);
function autoCompleteNew(e) {
$("#name").keyup(autoCompleteNew);
var value = $(this).val(); $(this).val = value.toLowerCase().replace(" ", ""); $("#short-name").val(value);
}
I thank you for a world, your help with this.