jQuery js json tree层级树

该博客介绍了如何使用jQuery和JavaScript处理JSON数据,通过递归方法生成树形结构,并展示在页面上。内容包括设置tree样式,操作DOM元素,获取数据,递归生成json tree数据,以及页面渲染的步骤。
摘要由CSDN通过智能技术生成

首先先引用jQuery.js,从资源上下载,仔细看认真看什么难事都不是什么难事

<script src="/UI/Scripts/jquery-1.11.3.min.js"></script>

1、tree样式

#TheBinding3 .fa.fa-minus{
	    width: 25px;
	    height: 25px;
	    margin: 0;
	    padding: 0;
	    text-align: center;
	    line-height: 25px;
	    cursor:pointer;
	}
	
	#TheBinding3 .fa.fa-plus{
	    width: 25px;
	    height: 25px;
	    margin: 0;
	    padding: 0;
	    text-align: center;
	    line-height: 25px;
	    cursor:pointer;
	}
	
	#TheBinding3 .left_content{
	    float: left;
	    max-width: 50%;
	    white-space: nowrap;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    padding-right: 8px;
	    font-size: 12px;
	}
	
	#TheBinding3 .left2_content{
	    float: left;
	    max-width: 50%;
	    white-space: nowrap;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    color:red;
	    font-size:12px;
	}
	#TheBinding3 .right_content{
	    float: left;
	    padding-right:10px;
	
	}
	.dd3-content.contort{
	    background: rgba(0, 218, 255, 0.2);
	}
	
	
	#TheBinding3 .dd3-handle{
	    padding:0;
	    cursor: auto;
	    position: absolute;
	    margin: 0;
	    left: 0;
	    top: 0;
	    cursor: pointer;
	    width: 25px;
	     height: 25px;  
	    white-space: nowrap;
	    overflow: hidden;
	    border: 1px solid #d4d
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值