javascript - BST 和表设置反应
问题描述
当我调用 BST 搜索的 find 功能时,它们的结果来得非常快
td = tree.find(e.target.value)
if (td !== null) {
for (i = 0; i < tr.length; i++) {
var item = tr[i].getElementsByTagName("td")[5]
if (td.val === item)
tr[i].style.display = "";
else
tr[i].style.display = "none";
}
}
and td is eleman of table , and i want to compare with value of item , i canot do this becuse result of find very fast and tr[i].getElementsByTagName("td")[5] is undefied
解决方案
推荐阅读
- android - 如何对创建新协程的函数进行单元测试?
- javascript - How to get all the combinations for an array of a specific length
- excel-formula - 在 Excel 中获取家庭单元格地址
- python - 有什么方法可以提高大数据集的熊猫程序的速度吗?
- r - ggplot2,facet_grid 的 x 轴问题
- react-native - 世博弹出如何指定操作系统
- python - 如何使用 S3 存储中可用的 miniconda
- java - 由于防火墙,无法连接到组织内的 Maven 中央存储库,Maven 无法连接到内部 URL,并且在简单项目中失败
- c# - 使用局部视图递归 ASP.NET Core MVC 中的动态菜单
- c# - CsvHelper.CsvRead 不返回任何内容