with specific value should i use something like this?
const select = document.querySelector("select");
const option = select.querySelector("option[value='Test']");
or is there better option?
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/options
so just loop it?
You can directly get access to specific element via querySelector. IMHO your solution is better
Considering what he just said, yes
so using querySelector is better than using array and found that? i just want to be sure that something is there or not. i don't want to do anything with that. in other word i just want a true or false. that's it. server will handle that value.
Обсуждают сегодня