javascript - 我正在尝试为搜索按钮做一些java脚本编码,如果用户没有输入任何数据,它应该给出错误但它不起作用
问题描述
我正在尝试为搜索按钮做一些java脚本编码,如果用户没有输入任何数据,它应该给出错误但它不起作用
if(requests.length == 0)
{
h4.innerHTML = "No service requests found";
container.appendChild(h4);
}
else
{
h4.innerHTML = "Showing " + requests.length + " 311 Service Requests in Winnipeg
that contains " + neighbourhood.toUpperCase();
container.appendChild(h4);
add_requests(requests);
}
})
解决方案
推荐阅读
- vba - 在连接单元格的情况下按字母顺序对列进行排序
- java - 有没有办法像 Java 中的模拟时钟指针一样旋转 Rectangles2D?
- hyperledger-fabric - HyperLedger 作曲家将 Rest 服务器暴露给外界
- css - Telerik Kendo Angular UI DropDownList 块调整大小
- typescript - 是否可以创建一个 Typescript 的子集,其中结果将具有健全的类型系统?
- mysql - 最小值函数返回最大值和最大值函数返回最小值
- java - 循环遍历具有交替元素的数组
- python - 如何将 printSchema 的结果保存到 PySpark 中的文件中
- php - 在 laravel 的重定向方法中添加 get 参数
- ionic3 - 如何在inappbrowser之外而不是在Inapp浏览器内打开外部Url