“HTML Random Texrt” Respostas de código

Texto do número aleatório em html

<button class="button" onclick="RandomID();" style="font-family: sans-serif;">RUN</button>
<input class="input" type="text" id="id" name="id" size="3" readonly />
Disgusted Dormouse

Texto do número aleatório em html

function RandomID() {
  var value;
  var rnd = Math.floor(Math.random() * 11);

  if (rnd === 7)
    value = "Wassup";
  else if (rnd <= 5)
    value = "Hello";
  else
    value = rnd;

  document.getElementById('id').value = value;
}
Disgusted Dormouse

HTML Random Texrt

2626626
fati fleur

Respostas semelhantes a “HTML Random Texrt”

Perguntas semelhantes a “HTML Random Texrt”

Mais respostas relacionadas para “HTML Random Texrt” em HTML

Procure respostas de código populares por idioma

Procurar outros idiomas de código