问题描述
function myFunction() {
var input,filter,table,tr,td,i,txtValue;
input = document.getElementById("myInput");
filter = input.value.toupperCase();
table = document.getElementById("myTable");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[0];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toupperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
我尝试以下操作均未成功(这是EPiServer中的C#):
<p class="read-more-link">
<a href="#">Link</a>
</p>
有人知道如何解决这个问题吗?