Si escribo algo con la letra 1, debería redirigir a otra página, por ejemplo: 1sometxt.
si no, debería redirigir a otra página
function functionclick() { var input = document.getElementById("myInput").value; var input1 = "1"; if (input === input1 + i dont know what to give here ) { window.open("www.example.com"); }else { window.open("www.example.com"); } }document.getElementById("myInput").addEventListener("change"), (e)=>{ var input = e.target.value if (input.includes(1) ) { window.open("www.example.com"); }else { window.open("www.example.com"); } }Puede verificar si input contiene '1' usando input.includes('1') , o si '1' debería ser el primer carácter, la condición if podría ser algo como esto
if(input[0] === input1) { // doesn't matter what next characters are, check if input first character equal to input1 variable // your code here }