例如,在这样的网站上
我如何编码才能在产品网格中突出显示任何高于 20 欧元的红色价格?另外,即使用户选择/取消选择右侧的类别,我也需要它继续工作。
这是 JavaScript 吗?
$('div').each(function() {
$(this).find('.mErEH _223RA').sort(function(a, b) {
return b.innerText - a.innerText;
}).slice(0, 5).addClass('higherthan20')
});
.higherthan20 {
color: red;
} Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号