Por favor, ayúdenme a cambiar los datos del elemento var con JavaScript . No puedo. Necesito If check.innerText cambiado para necesitar cambiar el número de teléfono.
function call(){ var check = document.getElementById("locinfo").innerText; var tellnum = "tel:+998951441000"; if (check=="Катартал") { tellnum = "tel:+998998047911"; } else if (check=="Куйлик") { tellnum = "tel:+998951440010"; } } window.location.href = tellnum; }Parece que tienes un } de repuesto, esto debería funcionar.
function call(){ var check = document.getElementById("locinfo").innerText; var tellnum = "tel:+998951441000"; if (check=="Катартал") { tellnum = "tel:+998998047911"; } else if (check=="Куйлик") { tellnum = "tel:+998951440010"; } window.location.href = tellnum; }