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
Post a Comment