javascript - How to let onclick disappear after clicking on something else -


i working on new webspace , have small problem. know have input tags onclick function

<script> function mark( el ) {     el.style.borderbottom= "3px solid white";   } </script> 

when click on first input border appears want when click on other input border of first input tag still there. how can let function work when it's clicked on input tag , not when input clicked well

thanking in anticipation

just use css's :focus pseudo class:

input:focus {      border-bottom:3px solid red;  }
<input type="text">  <input type="text">

mdn docs


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -