Home >Web Front-end >JS Tutorial >js traverses td tr and other html elements_basic knowledge

js traverses td tr and other html elements_basic knowledge

WBOY
WBOYOriginal
2016-05-16 17:46:421000browse
Copy code The code is as follows:

function checkuser(obj) {
var obj = window.event .srcElement;
var row = obj.parentElement.parentElement;
var value = row.cells[0].all[0].value;

var item = value.split("| ");
alert(item);
if (item.length > 1) {
if (item[0] == "org") {
alert('Please select a law enforcement officer ! ');
return false;
}

}
return true;
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn