<commit_before>let op = (function () {
  
  let content = document.getElementById('content'),
    page = document.getElementById('page'),
    pageNum = document.getElementById('pageNum'),
    numList = pageNum.getElementsByTagName('li'),
    pageInp = document.getElementById('numInp');
  
  let n = 1,
    total = 1,
    jsonData = null;
  
  const pageClickHandle = function pageClickHandle(e) {
    e = e || window.event;
    const target = e.target || e.srcElement;
    const tagName = target.tagName.toUpperCase();
    let value = target.firstChild.nodeValue;
    
    // 如果点的是那个input就直接返回，啥也不做
    if (tagName === 'INPUT') {
      return
    }
    
    // 如果点的是那四个伪装按钮span
    if (tagName === 'SPAN') {
      console.log('span');
    }
    
    // 如果点的是那几个页面按键
    if (tagName === 'LI') {
      value = Math.round(parseFloat(value));
      if (isNaN(value)) {
        n = 1;
      } else if (value > total) {
        n = total;
      } else if (value < 1) {
        n = 1;
      } else {
        n = value;
      }
  
      sendAJAX();
    }
    
    
    
  };
  
  const bindHTML = function bindHTML(data) {
    let str = '', i = 0;
    
    for (i = 0; i < data.length; i++) {
      str += `
        <li studentId="${data[i].id}">
          <span>${data[i].id}</span>
          <span>${data[i].name}</span>
          <span>${data[i].sex === 0 ? '女' : '男'}</span>
          <span>${data[i].score}</span>
        </li><commit_msg>完成 页码区功能键<commit_after>let op = (function () {
  
  let content = document.getElementById('content'),
    page = document.getElementById('page'),
    pageNum = document.getElementById('pageNum'),
    numList = pageNum.getElementsByTagName('li'),
    pageInp = document.getElementById('numInp');
  
  let n = 1,
    total = 1,
    jsonData = null;
  
  const pageClickHandle = function pageClickHandle(e) {
    e = e || window.event;
    const target = e.target || e.srcElement;
    const tagName = target.tagName.toUpperCase();
    let value = target.firstChild.nodeValue;
    
    // 如果点的是那个input就直接返回，啥也不做
    if (tagName === 'INPUT') {
      return
    }
    
    // 如果点的是那四个伪装按钮span
    if (tagName === 'SPAN') {
      switch (value) {
        case 'FIRST': {
          n = 1;
          break;
        }
        case 'PREV': {
          if (n === 1) {
            // 如果是第一页了，就不再发ajax请求直接返回
            return;
          }
          n--;
          break;
        }
        case 'NEXT': {
          if (n === total) {
            return;
          }
          n++;
          break;
        }
        case 'LAST': {
          n = total;
          break;
        }
        default: {
          n = 1;
        }
      }
      
    }
    
    // 如果点的是那几个页面按键
    if (tagName === 'LI') {
      value = Math.round(parseFloat(value));
      if (isNaN(value)) {
        n = 1;
      } else if (value > total) {
        n = total;
      } else if (value < 1) {
        n = 1;
      } else {
        n = value;
      }
    }
  
    sendAJAX();
    
  };
  
  const bindHTML = function bindHTML(data) {
    let str = '', i = 0;
    
    for (i = 0; i < data.length; i++) {
      str += `
        <li studentId="${data[i].id}">
          <span>${data[i].id}</span>
          <span>${data[i].name}</span>
          <span>${data[i].sex === 0 ? '女' : '男'}</span>
          <span>${data[i].score}</span>
        </li>
{'fraction_non_alphanumeric': 0.16167664670658682, 'fraction_numerical': 0.005688622754491018, 'mean_word_length': 1.6369376479873718, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6176152', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1205, 'n_words': 229}