html中ul中的间隔怎么写,动态加载li下的ul中的li,li之间的间隔怎么消除,在CSS里写的好像没用?...

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获取的,需要样式也发过来吗?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值