Answers for "input:focus show hide div"

2

hide input border on focus

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

hide div onfocus

<input type="text" 
    onfocus="document.getElementById('show_hide').style.display='block';"
    onblur="document.getElementById('show_hide').style.display='none';">
Posted by: Guest on August-10-2021
0

input:focus show hide div

<div class="container">
  <div class="row">
    <input class="abc" type="text" id='myinput'/>
  </div>
</div>

<div class="container">
  <div class="row">
    <span>some text here </span>
    <span>some text here</span>
  </div>
</div>

<div class="container newone">
  <div class="row">
    <span>some text here</span>
  </div>
</div>
 Run code snippet
Posted by: Guest on February-15-2022
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
0

input:focus show hide div

.newone { 
  display:none;
}
Posted by: Guest on February-15-2022

Browse Popular Code Answers by Language