Search
 
SCRIPT & CODE EXAMPLE
 

HTML

random number text in 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 />
Comment

random number text in 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;
}
Comment

PREVIOUS NEXT
Code Example
Html :: number input with any value and range 
Html :: <code html tag 
Html :: express js search example 
Html :: tailwind css typography 
Html :: html subtitle 
Html :: run html 
Html :: html entity close 
Html :: kotlin fabric 
Html :: html colors 
Html :: display observable in html angular 
Html :: convert figma to html 
Html :: HTMLPageStructure 
Html :: close copy with html 
Html :: unyson demo import fail 
Html :: textbox readonly 
Html :: 38 1,2 
Html :: kode vidio dalam html 
Html :: niklas von hertzen html2canvas textarea capture only one line 
Html :: i = ["hi", "he", 
Html :: disable suggestion input html yii2 
Html :: Aria hr role 
Html :: blank anger tag to open page on new window 
Html :: surrealcms content reigons 
Html :: how to add animated text in html 
Html :: javascript looparray 
Html :: gold color hash code 
Html :: Auto Update Form 
Html :: html tag link tittle bar 
Html :: order css file 
Html :: aria-live for search results 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =