Last active
June 19, 2023 05:27
-
-
Save aleister1102/64964f9f284f839e903e1c8b73093e8c to your computer and use it in GitHub Desktop.
Script đánh giá môn học
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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() | |
})() |
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è :>
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
Các bước thực hiện 🗒️:
value
. Ví dụ nếu muốn đánh giá 1 điểm hết thì chọn giá trị là 1.Tip 💡: có thể nhấn phím mũi tên lên để chạy lại script đã chạy mà không cần copy/paste