Skip to content

Instantly share code, notes, and snippets.

@mynamebvh
Last active January 3, 2022 16:38
Show Gist options
  • Save mynamebvh/d424d515b0b3827f45c0d33dbf4d9602 to your computer and use it in GitHub Desktop.
Save mynamebvh/d424d515b0b3827f45c0d33dbf4d9602 to your computer and use it in GitHub Desktop.
Đếm số ngày nghỉ - HaUI
(() => {
let count = 0;
let row = document.querySelectorAll(".kTableRow");
let rowAlt = document.querySelectorAll(".kTableAltRow");
let length = Math.max(row.length, rowAlt.length);
for (let index = 0; index < length; index++) {
count += parseInt(row[index]?.children[18]?.innerText) || 0;
count += parseInt(rowAlt[index]?.children[18]?.innerText) || 0;
}
alert(`Tổng số tiết nghỉ ${count}`);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment