📅  最后修改于: 2022-03-11 15:02:05.897000             🧑  作者: Mango
jQuery(function($) {
var path = window.location.href; // because the 'href' property of the DOM element is the absolute path
$('ul a').each(function() {
if (this.href === path) {
$(this).addClass('active');
}
});
});