generate functionWed, 03 May 2023

Funcion para validar rfc al momento de capturar datos que se han modificado

<!DOCTYPE html> <html> <body> <p>Ingrese el RFC</p> <input id="rfc" value=""> <button onclick="rfcValidation()">Verificar RFC</button> <p id="demo"></p> <script> function rfcValidation() { var x, text; // Get the value of the input field with id="numb" x = document.getElementById("rfc").value; // If x is Not a Number or less than one or greater than 10 if (isNaN(x) || x < 1 || x > 10) { text = "Input not valid"; } else { text = "Input OK"; } document.getElementById("demo").innerHTML = text; } </script> </body> </html>

Generate More

Questions about programming?Chat with your personal AI assistant