Mostrar no input
Gente esse código abaixo mostra o que é escrito em uma div, porém, preciso que mostre em outro input.
function alteraValor() {
var text = document.getElementById("b").value;
var specials = new Object();
specials["/[ÀÁÂÃÄ]/g"] = "A";
specials["/[ÈÉÊË]/g"] = "E";
specials["/[ÌÍÎÏ]/g"] = "I";
specials["/[ÒÓÔÕÖ]/g"] = "O";
specials["/[ÙÚÛÜ]/g"] = "U";
specials["/[Ç]/g"] = "C";
for (var property in specials) {
text = text.replace(eval(property), specials[property]);
text = text.replace(eval(property.toLowerCase()), specials[property].toLowerCase());
}
text = text.replace(/\ /g, "-");
document.getElementById("a").textContent = text;
}
<input id="b" oninput="alteraValor()"/>
<div id="a"></div>Discussão (1)
Carregando comentários...