js如何获取window.location.href跳转后查询字符串的值?

时间:2022-02-13 22:03:54
$("#worked_count").parent().attr("onClick","window.location.href='view/warn/task_list.html?task_status=D'");
$(document).ready(function () {
console.dir(window.location.search);
//打印?task_status=E
});