0
I have this code that gives me the phone mask, but I can’t get the input to start with the 9 in front, preventing the user to delete it, making it mandatory. Does anyone have any idea what to do?
<script>
if (opt == "Celular") {
if (document.getElementById('fone').readOnly)
document.getElementById('fone').readOnly = false;
mask = "99999-9999";
document.getElementById("oc_oc").className = "oculto";
}
</script>
<div class="num_class">
<label>Numero</label><br>
<input readonly maxlength="10" required class="inp_editar" type="text" name="fone_tel" id="fone"/>
</div>
In my case it did not work because it interferes with the first function, thank you!
– JASL