Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
26 changes: 16 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- //login form -->
<form action="/login" method="post">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
<br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<br>
<button type="submit">Login</button>

<div class="container">
<h2>Login Form</h2>
<form>
<label>Username</label>
<input type="text" required>
<label>Password</label>
<input type="password" required>
<label>Age</label>
<select id="age">
<option value="">Select Age</option>
</select>
<button>Login</button>
</form>
</div>
<script src="script.js" defer></script>
</body>
</html>
9 changes: 9 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const age=document.getElementById("age");
for(let i=1;i<=99;i++){
let opt=document.createElement("option");
opt.text=i;
age.add(opt);
}
age.onchange=function(){
document.body.style.background="#ff9a9e";
};
25 changes: 25 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
body{
margin:0;
height:100vh;
display:flex;
justify-content:center;
align-items:center;
background:#74ebd5;
font-family:Arial;
}
.container{
background:#fff;
padding:20px;
border-radius:8px;
width:250px;
}
input,select,button{
width:100%;
margin:5px 0;
padding:6px;
}
button{
background:#4CAF50;
color:white;
border:none;
}