Ю
Size: a a a
Ю
KS
AD
S
VK
VK
NS
ОГ
button1.onclick = function() {
if (search.value.match('id1\\d{4}')) {
document.location.href = `test/${search.value}/index.html`;
}
else {
document.querySelector('.form-group2').style.display = 'inline-block';
}
}
B
button1.onclick = function() {
if (search.value.match('id1\\d{4}')) {
document.location.href = `test/${search.value}/index.html`;
}
else {
document.querySelector('.form-group2').style.display = 'inline-block';
}
}
ОГ
B
ОГ
`test/${search.value}/index.html`
, нужно сделать так что если данная ссылка нерабочая, там нет index.html то не надо мне ничего открывать, а просто останься на той же странице где ты сейчас есть и выполни мне другой кусок кода document.querySelector('.form-group2').style.display = 'inline-block';
B
ОГ
ОГ
B
B