1 Star 1 Fork 0

老甄Home/data-structures

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.html 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>链表</title>
</head>
<body>
<div>
<ul>
<li>
<a href="#LinkedList" onclick="testLog('LinkedList')">链表(Linked List)测试</a>
</li>
<li>
<a href="#DoublyLinkedList" onclick="testLog('DoublyLinkedList')">双向链表</a>
</li>
<li>
<a href="#CircularLinkedList" onclick="testLog('CircularLinkedList')">单向循环链表</a>
</li>
</ul>
</div>
</body>
<!-- <script type="module" src="./test/DoublyLinkedList.js"></script> -->
<script>
function testLog(name) {
// 移除之前的测试脚本
removeScript()
// 添加新的测试脚本
const scriptEl = document.createElement('script')
scriptEl.className = 'test-log'
scriptEl.src = `./test/${name}.js?${new Date().getTime()}`
scriptEl.type = 'module'
document.body.appendChild(scriptEl)
}
function removeScript() {
const scriptEls = document.querySelectorAll('.test-log')
for (let i = 0; i < scriptEls.length; i++) {
document.body.removeChild(scriptEls[i])
}
}
</script>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhench0515/data-structures.git
git@gitee.com:zhench0515/data-structures.git
zhench0515
data-structures
data-structures
master

搜索帮助