Commit 0781545a authored by ferhat tamer's avatar ferhat tamer 💬
Browse files

Initial commit

parents
*{
margin: 0;
padding: 0;
user-select: none;
box-sizing: border-box;
}
.box {
background-color: white;
padding-top: 35px;
padding: 35px;
border: 2px solid black;
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}
body{
background-color: purple;
justify-content: center;
align-items: center;
display: flex;
min-height: 100vh;
}
.box h2 {
margin-bottom: 45px;
text-align: center;
font-size: 30px;
color: black;
font-family: sans-serif;
}
#button{
font-family: sans-serif;
font-size: 18px;
margin-top: 45px;
border: 2px solid black;
width: 160px;
height: 55px;
background-color: purple;
display: flex;
border-radius: 10px;
cursor: pointer;
color:rgb(255,255,255);
justify-content: center;
align-items: center;
}
#button:hover{
color: white;
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}
.btn2 {
margin-left: 90px;
}
input::placeholder{
font-size: 25px;
}
input{
padding: 25px;
user-select: none;
height: 55px;
width: 400px;
border-radius: 8px;
border: none;
border: 2px solid black;
outline: none;
font-size: 25px;
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="random.js"></script>
<link rel="stylesheet" href="random.css">
<title>Random Şifre Oluşturucu</title>
</head>
<body>
<div class="box">
<h2>Random Password Oluşturucu</h2>
<input type="text" placeholder="Password Oluştur" id="password" readonly/>
<table>
<th> <div id="button" class="btn1" onclick="MakePassword()">Oluştur</div></th>
<th><a id="button" class="btn2" onclick="Kopyala()">Kopyala</a></th>
</table>
</div>
</body>
</html>
\ No newline at end of file
var password=document.getElementById('password')
function MakePassword(){
var chars =
'0123456789qwertyuopasdfghjklizxcvbnm!^#%&/()*@QWERTYUIOPASDFGHJKLZXCVBNM'
var passwordLenght = 12
var password = ''
var i =0;
for (;i < passwordLenght; i++)
{
var rastgeleSayi = Math.floor(Math.random() * chars.length)
password += chars.substring(rastgeleSayi, rastgeleSayi+1)
}
document.getElementById('password').value=password
}
function Kopyala(){
var kopyaText = document.getElementById('password')
kopyaText.select()
kopyaText.setSelectionRange(0, 999)
document.execCommand('copy')
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment