Anhui University's Zhengfang Academic Affairs System uses JS to complete teacher evaluation with one click

1. Open the educational administration system

Place the mouse on the teaching quality evaluation and click on the first course to be evaluated to enter the teaching evaluation page.

Anhui University's Zhengfang Academic Affairs System uses JS to complete teacher evaluation with one click

2. Open the console

Press F12 to call up the developer tools, click the console (①)
Anhui University's Zhengfang Academic Affairs System uses JS to complete teacher evaluation with one click

Then click the arrow at ②, paste the code below , and press Enter .

(function() {
    var courseCode;
    var timer;
  
    var autoFill=function() {
  
      var frame = document.getElementById('rightDiv').getElementsByTagName('iframe')[0].contentWindow.document;
  
      if (!frame || !frame.getElementById('pjkc'))
          return false;
  
      var divJs = frame.getElementById('divJs');
      var items = divJs.getElementsByTagName('select');
  
      var newCourseCode = frame.getElementById('pjkc').value;
  
      console.log(newCourseCode,courseCode)
  
      if (newCourseCode == courseCode) {
        clearInterval(timer);
        console.log('评价完成');
        return true;
      }
      courseCode = newCourseCode;
  
      for (i = 0; i < items.length; i++){
        items[i].value = "A"
        if (i == 5){
            items[i].value = "B" //因为不让完全重复,所以第六个选B
        }

      }
        
      frame.getElementById('Button1').click();
    }
    timer = setInterval(autoFill, 2000);
  })();

After 10 seconds, the evaluation is completed . Then go to the lower right corner and click Submit to end.

Anhui University's Zhengfang Academic Affairs System uses JS to complete teacher evaluation with one click

If you press Enter to report an error and the page responds , refresh the page , and then paste the code and press Enter.

3. Explain the principle


Reference: Let's get rid of the pain of compulsory teaching evaluation in the educational administration system- 简书

Guess you like

Origin blog.csdn.net/qq_34626094/article/details/113034541