Home >Web Front-end >JS Tutorial >How to get the td value of the non-last column and set the title to that value_javascript skills

How to get the td value of the non-last column and set the title to that value_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:18:04960browse
Copy code The code is as follows:

$(function() {
$('table tr td :not(:last-child)').mouseover(function() {
val = $(this).text().trim();
$(this).attr({title:val} );
})
});
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