6
After searching the site, I found this question with solution, but the solution is in jquery
!
When choosing option X need a field in specific is disabled and only be enabled again if another option is triggered!
I need this solution in JavaScript
(every project is in Javascript).
<button id='btn_habilitar'>Habilita</button>
<button id='btn_desabilitar'>Desabilita</button>
<br>
<br>
<textarea id='obs' placeholder='Observação!'></textarea>
You do not think it bad to shoot the event on every screen ?
– Gabriel Rodrigues
@Gabrielrodrigues in this case is an example. But more generally depends on the case and depends on the type of event. All events have capture and Bubbling. When you use delegation that’s what you do.
– Sergio