Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

118
Visualizações
Uneditable characters in textarea using jquery

I have to show some blank fillups in textarea. After every fillups there is fullstop, User can type anything in fill ups. But the full stop should be fixed they cannot delete the full stop. Any solution . Thanks

_______________ . _____________________ . ________________________ .

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Impossible to achieve using a textarea.
But using some inputs, it is possible. You just need to work on your CSS to make it look as you wish... Like in a larger box.

let fillup = $(".fillup")

fillup.on("keydown", function(e) {
  let val = this.value
  if (val.length == $(this).attr("maxlength")) {
    $(this).next(".fillup").focus()
  }
  if (e.key === "Backspace" && val.length === 0) {
    $(this).prev(".fillup").focus()
  }
})
fillup.first().focus()
input {
  width: 2.7em;
  border: 0;
  border-bottom: 1px solid cyan;
}

input:focus {
  outline: none;
}

.box {
  border: 1px solid grey;
  padding: 0.5em 3em;
  border-radius: 3px;
  width: 8em;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="box">
  <input class="fillup" maxlength="5" /></input>.<input class="fillup" maxlength="5" /></input>.<input class="fillup" maxlength="5" /></input>
</div>

about 4 years ago · Juan Pablo Isaza Relatório

0

Check it out

<div><textarea></textarea></div>
<style>
textarea{
     outline:none;
     border:none;
     border-bottom:1px solid #888;
}
div::after{
     content:".";
}
</style>

You can use input too instead of textarea

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda