<yandex-station title="Макс" room="Детская">
<yandex-station title="Станция 2" room="Коридор">
...
"run_at": "document_start",
"run_at": "document_end",
Неужели, нет встроенной настройки для этого?\
let result = '-';
let max = 3;
for (let i = 1; i <= max; i++) {
for (let j = 1; j <= i; j++) {
result += 'x';
}
result += '-';
}
for (let i = max - 1; i >= 1; i--) {
for (let j = 1; j <= i; j++) {
result += 'x';
}
result += '-';
}
console.log(result);
let result = '-';
let max = 3;
const count = (max - 1) * 2 + 1;
for (let i = 1; i <= count; i++) {
let cond = i <= max ? i : count - i + 1;
for (let j = 1; j <= cond; j++) result += 'x';
result += '-';
}
console.log(result);
<script src="main.js" type="module"></script>
import ru from "./ru";
const input = document.querySelector("#phone");
intlTelInput(input, {
i18n: ru,
initialCountry: "ru",
});
<script type="module">
import ru from "./ru";
const input = document.querySelector("#phone");
intlTelInput(input, {
i18n: ru,
initialCountry: "ru",
});
</script>
doOrderBtn.addEventListener('click', function (el) {
const phio = document.querySelector('#name')
const phone = document.querySelector('#phone')
const address = document.querySelector('#address')
if (phio.value < 1 && phone.value < 1 && address.value < 1) {
el.preventDefault()
}
});