📜  jquery 获取 aria-label 值 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:48.857000             🧑  作者: Mango

代码示例1
$(".togSubList").each(function () {
        var bob = $(this).find(".parent_link").text();

        $(this).find(".sub-expand_collapse[aria-expanded='false']").attr("aria-label","expand " + bob);
         $(this).find(".sub-expand_collapse[aria-expanded='true']").attr("aria-label","close " + bob);
            

    });