1
2
<html>
3
<head>
4
<style>
5
.input
6
{
7
height:30px;
8
width:30%;
9
}
10
</style>
11
</head>
12
<body>
13
<h1>JavaScript on focus</h1>
14
<p id="paragraph">this input will take border after value changed , after blured</p>
15
<input type="text" class="input" id="input" placeholder="Enter Username">
16
<script>
17
let input = document.getElementById("input");
18
input.onfocus = function(){
19
input.style.border='1px solid #55efc4';
20
}
21
</script>
22
</body>
23
</html>