84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我需要从一个table中动态的选择一些tr,包含关键词的tr会显示,不包含的会隐藏。于是我使用了
var key = $(this).text(); $('#table tr:has(td):not(:contains(key))').hide();
这时候key会被识别成一个字符串,而不是一个变量,请问如何做可以让浏览器识别它为变量?
小伙看你根骨奇佳,潜力无限,来学PHP伐。
$('#table tr:has(td):not(:contains('+ key +'))').hide();
$('#table tr:has(td):not(:contains('+ key +'))').hide();