<html>
<head>
<title> Random Alpha numeric String Generator </title>
</head>
<script>
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 8;
var randomstringGenerator = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstringGenerator += chars.substring(rnum,rnum+1);
}
document.getElementById("randomfield").innerHTML = randomstringGenerator;
}
</script>
<body>
<center>
<h2 style="color: green"> Random Alpha Numeric String Generator </h2>
<h3> Click the button to generate a random alpha-numeric string </h3>
<form name="randform">
<input type="button" value="Generate" onClick="randomString();">
<br><br>
<h4 id="randomfield" style="color: green"> </h4>
</form>
</center>
</body>
</html>