I believe it's a new request from what I've seen here. I'm using onkeyup() on one input to append and create a new value in a second input. It works great but I want to restrict white/blank spaces in the second input. See pen here
HTML
<input type="text" id="fullnames" onkeyup="createUsername();" placeholder="Enter Your Full Name">
<!--restrict blank space-->
<input type="text" id="username" placeholder="Username">
Script
function createUsername() {
var x = document.getElementById("fullnames").value;
document.getElementById("username").value= x;
}
Final result
This is how it should be
Full Names : John Doe
Username : johndoe