I have this code that gives me the phone mascara, but I can not make the input already start with 9 in front, preventing the user from erasing it, making it mandatory. Does anyone have an 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>