crop_rotate
Run
<!DOCTYPE html> <html> <head> <style> .input { height:30px; width:30%; } </style> </head> <body> <h1>JavaScript On Blur</h1> <p id="paragraph">this input will take border after value changed , after blured</p> <input type="text" class="input" id="input" placeholder="Enter Username"> <script> let input = document.getElementById("input"); input.addEventListener('change',()=>{ input.style.border='1px solid #55efc4' }); input.addEventListener('blur',()=>{ input.style.border='2px solid red' }); </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPg0KIC5pbnB1dA0KIHsNCiAgIGhlaWdodDozMHB4Ow0KICAgd2lkdGg6MzAlOw0KIH0NCjwvc3R5bGU+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPiA6Oi13ZWJraXQtc2Nyb2xsYmFye3dpZHRoOjdweDtoZWlnaHQ6N3B4O306Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNre2JhY2tncm91bmQ6I2ZmZjt9Ojotd2Via2l0LXNjcm9sbGJhci10aHVtYntib3JkZXItcmFkaXVzOjVweDtiYWNrZ3JvdW5kOiMyZjQ1ZmY7fTwvc3R5bGU+PC9oZWFkPg0KPGJvZHk+DQo8aDE+SmF2YVNjcmlwdCBPbiBCbHVyPC9oMT4NCjxwIGlkPSJwYXJhZ3JhcGgiPnRoaXMgaW5wdXQgd2lsbCB0YWtlIGJvcmRlciBhZnRlciB2YWx1ZSBjaGFuZ2VkICwgYWZ0ZXIgYmx1cmVkPC9wPg0KPGlucHV0IHR5cGU9InRleHQiIGNsYXNzPSJpbnB1dCIgaWQ9ImlucHV0IiBwbGFjZWhvbGRlcj0iRW50ZXIgVXNlcm5hbWUiPg0KPHNjcmlwdD4NCmxldCBpbnB1dCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJpbnB1dCIpOw0KaW5wdXQuYWRkRXZlbnRMaXN0ZW5lcignY2hhbmdlJywoKT0+ew0KICAgaW5wdXQuc3R5bGUuYm9yZGVyPScxcHggc29saWQgIzU1ZWZjNCcNCn0pOw0KaW5wdXQuYWRkRXZlbnRMaXN0ZW5lcignYmx1cicsKCk9PnsNCiAgIGlucHV0LnN0eWxlLmJvcmRlcj0nMnB4IHNvbGlkIHJlZCcNCn0pOw0KPC9zY3JpcHQ+DQo8L2JvZHk+DQo8L2h0bWw+