Random Password Generator With Javascript
Code Here
<!DOCTYPE html>
<html>
<head>
<title> Generator Password</title>
</head>
<body>
<h1> Password Generator</h1>
<input type="text" name="" id="generate">
<input type="button" name="" value ="Password Generator button" onclick="pass()">
<script type="text/javascript">
function pass(){
var result= ''
for (var i = 0; i <10; i++) {
var sac = "abcdefghijklmnopqrstuvwxyz!@#$^&*()_+=123456";
var din = Math.floor(Math.random() * 40);
result += sac.charAt(din);
}
document.getElementById('generate').value = result;
}
</script>
</body>
</html>
0 Comments:
Post a Comment