document.addEventListener("DOMContentLoaded", function() { fetch("../Team.html") .then(response => response.text()) .then(html => { const parser = new DOMParser(); const otherDoc = parser.parseFromString(html, "text/html"); const otherUL = otherDoc.getElementById("sourceList"); const targetList = document.getElementById("targetList"); const liElements = otherUL.getElementsByTagName("li"); const searchString = "Yi Liu"; let hasMatch = false; // 标记是否有匹配的li元素 for (let i = 0; i < liElements.length; i++) { const li = liElements[i]; if (li.textContent.includes(searchString)) { hasMatch = true; const newLI = document.createElement("li"); newLI.innerHTML = li.innerHTML; newLI.classList.add("list-group-item"); newLI.classList.add("list_ins");// 添加保持样式的类名 // 添加自定义类名 targetList.appendChild(newLI); } } if (!hasMatch) { const newLI = document.createElement("li"); newLI.textContent = "暂无"; newLI.classList.add("list-group-item"); newLI.classList.add("list_ins");// 添加保持样式的类名 // 添加自定义类名 targetList.appendChild(newLI); } }) .catch(error => console.log(error)); });
Name: 刘益 Yi Liu
Education: Master Student
Research Direction: NLP,SNA,ML
Email: liuyi1999@iie.ac.cn
Introduction:
刘益,2021级硕士研究生。
Yi Liu, Master Student of the grade 2021.
Awards and Honors:
Representative Works: