String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
系统管理员(Admin)
3
当前位置:
- 调度基础数据>
- 调度基础数据库>
- 电网>
- 总调直调电网>
- 变电站>
- 500kV海港变电站>
" style="display:none" id="acc"/>
var path = document.getElementById("acc").value;
var dd = 0;
function GetXHR(){
var xhr = null;
if(window.XMLHttpRequest){
xhr = new window.XMLHttpRequest();
}else if(window.ActiveXObject){
xhr = new window.ActiveXObject();
}
return xhr;
}
window.onload = function(){
var xhr = GetXHR();
xhr.onreadystatechange = function(){
if(xhr.readyState == 4 && xhr.status == 200){
var jay = eval(xhr.responseText);
var a = document.getElementById("aa");
for(var i=0;i
a.innerHTML += "
"+jay[i].MENU_NAME+"";}
}
}
xhr.open("POST",path+"get",true);
xhr.setRequestHeader("content-type","application/x-www-form-urlencoded");
xhr.send("op=CDTree/getCDTree&id="+"b62830d9-26d8-4614-a5e9-f202bdb91a2a");
}
function show(li){
var id = li.id;
var xhr = GetXHR();
xhr.onreadystatechange = function(){
if(xhr.readyState == 4 && xhr.status == 200){
var jay = eval(xhr.responseText);
var a = document.getElementById("bb");
a.innerHTML = "";
for(var i =0;i
a.innerHTML += ""+jay[i].NAME+"";
}
}
}
xhr.open("POST",path+"get",true);
xhr.setRequestHeader("content-type","application/x-www-form-urlencoded");
xhr.send("op=CDTree/showLJ&id="+id);
}
function subshow(li){
if(dd>0){
}else{
var id = li.id;
var xhr = GetXHR();
xhr.onreadystatechange = function(){
if(xhr.readyState == 4 && xhr.status == 200){
var jay = eval(xhr.responseText);
var a = document.getElementById(id);
if(jay.length > 0){
var ul = document.createElement("ul");
ul.id = id+"1";
a.appendChild(ul);
// alert(1);
for(var i = 0; i
document.getElementById(ul.id).innerHTML += "
"+jay[i].NAME+"";}
document.getElementById(ul.id).style.display = "block";
}
}
}
xhr.open("POST",path+"get",true);
xhr.setRequestHeader("content-type","application/x-www-form-urlencoded");
xhr.send("op=CDTree/subCD&id="+id);
dd = 1;
}
}
function subhide(li){
if(dd>0){
var submenu = li.getElementsByTagName("ul")[0];
if(submenu){
li.removeChild(submenu);
}
}
dd = 0;
}
菜单的第一级也是通过ajax获取的,需要样式也发过来吗?