Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

random code generator

let randomCode = (Math.random() + 1).toString(36).substring(7);
console.log("random code :", randomCode);
Comment

random code

import random
letters = ('a','b','c')
print.random(random.choice(letters))
Comment

Simple random code generator

<html>  
<head>   
<title> Random String Generator </title>  
</head>  
  
<script>  
function randomStringGenerator() {  
    var characters = "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";  
              
            //specify the length random new string  
    var lenString = 8;  
    var randomstring = '';  
  
    for (var i=0; i<lenString; i++) {  
        var rnum = Math.floor(Math.random() * characters.length);  
        randomstring += characters.substring(rnum, rnum+1);  
    }  
  
    document.getElementById("randomfield").innerHTML = randomstring;  
}  
</script>  
  
<body>  
<center>  
<h2 style="color: red"> Random String Generator </h2>  
<h3> Click the button to generate a new random string </h3>  
  
<form name="randomstring">  
<input type="button" value="Generate " onClick="randomStringGenerator();">  
<br><br>  
<b><p id="randomfield" style="color: blueviolet"> </p></b>  
</form>  
  
</center>  
</body>  
</html>
Comment

PREVIOUS NEXT
Code Example
Javascript :: js hexadecimal 
Javascript :: javascript sort array of objects 
Javascript :: integer to array javascript 
Javascript :: disabling submit button until all fields have values 
Javascript :: discord.js v13 if dm 
Javascript :: vscode rest api extention POST method 
Javascript :: Iterate Through an Array with a For Loop 
Javascript :: npm got 
Javascript :: request animation frame 
Javascript :: how to compare objets in an array 
Javascript :: javascript html append 
Javascript :: js then 
Javascript :: how to use console.log in vuejs 
Javascript :: js add animation to element 
Javascript :: html onchange call js function 
Javascript :: adding cypress to react project using npm 
Javascript :: mapbox remove marker 
Javascript :: No provider for ReducerManager 
Javascript :: How to get latitude and longitude from address in angular 6 
Javascript :: for of loop in es6 
Javascript :: create fooer on print page with jquery 
Javascript :: base64 to image nodejs 
Javascript :: how to read a csv file in nodejs 
Javascript :: fetch get request 
Javascript :: angular automatic typewriter animation 
Javascript :: javascript push dictionary into array 
Javascript :: how to convert array converted to string back to array javasccript 
Javascript :: js length of longest array in 2d array 
Javascript :: javascript how to take off a decimal 
Javascript :: javascript insert text in textarea at cursor position 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =