Skip to content

Instantly share code, notes, and snippets.

@aleister1102
Last active June 19, 2023 05:27
Show Gist options
  • Save aleister1102/64964f9f284f839e903e1c8b73093e8c to your computer and use it in GitHub Desktop.
Save aleister1102/64964f9f284f839e903e1c8b73093e8c to your computer and use it in GitHub Desktop.
Script đánh giá môn học
(function rating() {
const value = 5; // Chỉnh giá trị muốn đánh giá ở đây
for (let i = 0; i < 9; i++) {
const rows = document.querySelectorAll("tr");
rows.forEach((row) => {
const radioButton = row.querySelector(`input[type='radio']:nth-of-type(${value})`);
if(radioButton)
radioButton.checked = true;
})
const nextButton = document.querySelector("input[value='Tiếp']")
nextButton.click();
}
const finishButton = document.querySelector("input[value='Hoàn tất']");
finishButton.click();
const listButton = document.querySelector("input[value='Danh sách']");
listButton.click();
window.location.reload()
})()
@aleister1102
Copy link
Author

có thể phải reload trang giữa các môn á. Test trên Firefox, lỗi biến đã tồn tại nè :>

Tks bro 💯 , đã thêm dòng reload sau khi đánh giá :>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment