1
2
<html>
3
<head>
4
<style>
5
.input
6
{
7
height:30px;
8
width:30%;
9
}
10
.btn
11
{
12
padding:10px;
13
background-color:#007bff;
14
border:none;
15
color:white;
16
}
17
</style>
18
</head>
19
<body>
20
<h1>JavaScript on focus </h1>
21
<p id="paragraph">border color will change , after focus</p>
22
<form action="" method="post" onsubmit="alert('Data Sent successfully')">
23
<input type="text" class="input" placeholder="Enter Username">
24
<input class="btn" type="submit">
25
</form>
26
</body>
27
</html>