inp.addEventListener('keyup',()=>{
for(let key in codes){
if(inp.value === key){
info.textContent = `${codes[key]}`;
info.style.display = 'block';
} else {
info.style.display = 'none';
}
};
});inp.addEventListener('keyup',()=>{
if(inp.value in codes) {
info.textContent = `${codes[inp.value]}`;
info.style.display = 'block';
}
else {
info.style.display = 'none';
}
});
$stmt = $db->prepare("INSERT INTO `users` VALUES(null, ?,?)");
$stmt->bid_param("ss", $login, $pass);
$stmt->execute();
let parent = el.closest('.promo');
let copyText = parent.querySelector('.promo-text')
const langTests = {
'en': textEn,
'ru': textRu,
};const getText = (lang) => {
const tests = langTests[lang];
return tests[Math.floor(Math.random() * tests.length)];
}
let language = 'en';
getText(language) // 'test2'