-3
I was wondering if it is possible to simplify this instruction when clicking on imputs. I can put input-smtpname, input-smtplogin.... etc...?
document.getElementById('customSwitch1').onchange = function() {
document.getElementById('input-smtpname').disabled = !this.checked;
document.getElementById('input-smtplogin').disabled = !this.checked;
document.getElementById('input-smtp').disabled = !this.checked;
document.getElementById('input-smtpport').disabled = !this.checked;
document.getElementById('input-smtpass').disabled = !this.checked;
document.getElementById('input-smtpssl').disabled = !this.checked;
};
You can clarify the question because it doesn’t make sense. You ask for a simplification, okay, but this passage "...I can input-smtpname, input-smtplogin.... etc...?" needs to be clarified because it is absent of meaning.
– Augusto Vasques
@Augustovasques I even understand your need, but two people understood what I was thinking of doing, I also believe that I do not need to be very clear, because as I said, people understood and helped me with my goal!
– Gleriston Castro
If the answers satisfied you better, but I suspect that your problem can be solved with a single line. I just don’t have information to affirm.
– Augusto Vasques