{% extends 'base.html' %} {% load static %} {% load unicorn %} {% block navbar_item %} 敏感词库维护 {% endblock %} {% block content %}

Sensitive Word Detection Tool for Documents

敏感词检测工具

可批量上传,支持 .docx, .doc, .dot, .pptx, .ppt, .pdf, .xls, .xlsx, .txt(UTF-8) 格式文件
{% csrf_token %}

{% endblock %} {% block script %} {# show file name after file selected#} // 获取文件选择输入框和文件名显示容器 const fileInput = document.getElementById('file-input'); const fileListDiv = document.getElementById('file-list'); // 添加事件监听器来处理文件选择 fileInput.addEventListener('change', function() { // 获取所选文件列表 const selectedFiles = fileInput.files; // 创建一个用于显示文件名的字符串 let fileListText = '所选文件:
'; // 遍历文件列表并添加文件名到字符串 for (let i = 0; i < selectedFiles.length; i++) { const fileName = selectedFiles[i].name; fileListText += `${fileName}
`; } // 将文件名字符串插入到页面上的容器中 fileListDiv.innerHTML = fileListText; }); {% endblock %}