Answers for "hide label text on input focus"

CSS
2

hide input border on focus

input:focus{
    border: none;
}
Posted by: Guest on April-22-2021
0

input:focus show hide div

var input = document.getElementById('myinput');
var message = document.getElementsByClassName('newone')[0];
input.addEventListener('focus', function() {
    message.style.display = 'block';
});
input.addEventListener('focusout', function() {
    message.style.display = 'none';
});
Posted by: Guest on February-15-2022

Browse Popular Code Answers by Language