<script> window.onload = function() { //要折叠的区域 var catalog = document.getElementById("div-id"); //如果全部列表都添加折叠使用document.getElementsByTagName("ul"); var childs = catalog.getElementsByTagName("ul"); for (var i = 0; i <
js 控制展开折叠 div html dom <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;chars