Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script>
- function stringGen()
- {
- var lenn=document.getElementById("num").value;
- var arr='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- var a='';
- for(let i=0;i<lenn;i++){
- var pos=parseInt(Math.random()*(61-0));
- a=a+arr[pos];
- }
- document.getElementById("result").innerHTML = a;
- return a;
- }
- </script>
- </head>
- <body>
- <div>
- Enter the length of character:
- <input type='text' id
Add Comment
Please, Sign In to add comment