【发布时间】:2021-07-01 19:37:04
【问题描述】:
网站是https://thestripclubhookup.com
当我点击搜索并尝试输入两个单词的城市时,它会自动关闭搜索框。
这是怎么回事?我试图弄清楚,但我不知道它可能是什么。
它可以在移动设备和桌面设备上执行此操作。
提前感谢您的帮助。
这里是搜索功能的JS sn-p:
function goCity() {
var category = document.getElementById("categories").value;
if (category == "clubs") {
var city = document.getElementById("cities").value;
//console.log(city);
if(city != "Location") {
window.location.href = city;
}
else {
document.getElementById("error").classList.add("city-error-style");
document.getElementById("error").innerHTML = "Please Choose Location";
}
}
}
【问题讨论】:
标签: html search twitter-bootstrap-3