Answers for "generate random special characters javascript"

0

generate random special characters javascript

<script language="javascript" type="text/javascript">
function randomString() {
	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
	var string_length = 8;
	var randomstring = '';
	for (var i=0; i<string_length; i++) {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	}
	document.randform.randomfield.value = randomstring;
}
</script>
Posted by: Guest on October-19-2020
0

generate random special characters javascript

<form name="randform">
<input type="button" value="Create Random String" onClick="randomString();"> 
<input type="text" name="randomfield" value="">
</form>
Posted by: Guest on October-19-2020

Code answers related to "generate random special characters javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language