<select class="myselect" name="select1">
<option value="1" selected>one</option>
<option value="2">two</option>
<option value="3">three</option>
<option value="4">four</option>
<option value="5">five</option>
</select>
<select class="myselect" name="select2">
<option value="2" selected>two</option>
<option value="3">three</option>
<option value="4">four</option>
<option value="5">five</option>
</select>
<select class="myselect" name="select3">
<option value="1">one</option>
<option value="3" selected>three</option>
<option value="5">five</option>
<option value="6">six</option>
</select>
const check = (selects, event) => {
const selected = new Set([event.target.value])
selects.forEach(el => selected.add(el.value));
selects.forEach(forRemoved => {
const options = forRemoved.querySelectorAll(`option`)
options.forEach(option => {
option.disabled = selected.has(option.value);
})
})
}
document.addEventListener("DOMContentLoaded", () => {
const selects = document.querySelectorAll(".myselect");
selects.forEach(select => select.addEventListener("change", e => check(selects, e)))
})
const anyFetch = async () =>
fetch(url)
.then(arr => arr.map(
id => fetch(url + id)
));
const allData = Promise.All(anyFetch).then(arrOfFinishData => doSomething(arrOfFinishData));
std::string str = "00/34";
std::string::size_type slash = str.find("/");
if (slash != std::string::npos) {
int num1 = atoi(str.substr(0, slash-1).c_str());
int num2 = atoi(str.substr(slash+1).c_str());
cout<<"Num1: " << num1 << ", Num2: " << num2;
}