트리 구조

3611 단어


	
		
		
		<link rel="stylesheet" href="../easy/themes/default/easyui.css"/>
		<link rel="stylesheet" href="easy/themes/icon.css"/>
		<script type="text/javascript" src="../easy/jquery.min.js"/>
		<script type="text/javascript" src="../easy/jquery.easyui.min.js"/>
	
	
		<a href="javascript:;" class="easyui-linkbutton" id="append"> </a>
		</code></pre><ul id="ul" class="easyui-tree" url="tree.php" checkbox="true" onlyleafcheck="true" lines="true" dnd="true">
			<!--<li>
				<span> 1</span>
				<ul>
					<li><span> </span>
						<ul>
							<li> </li>
							<li> </li>
							<li> </li>
							<li> </li>
						</ul>
						<ul>
							<li>
                                                          <ul>
							<li> </li>
							<li> </li>
							<li> </li>
							<li> </li>
						</ul>
                                        </li><span> </span></li>
					<li><span> </span></li>
				</ul>
			</li>
			<li> 2</li>
			<li> 3</li>
		</ul>-->
		<script>
			$(function(){
				$("#append").click(function(){
					var li = $("#ul").tree("getSelected");
					if(li) {
						// 
						$("#ul").tree("append",{
							parent:li.target,
							data:[
								{
									id:11,
									text:" 11",
								},
								{
									id:12,
									text:" 12",
								},
							],
						});
					}
				});
			})
		</script>
	

 
 </ul></div> 
 <p>  </p> 
 <meta charset="UTF-8"/><title/><link rel="stylesheet" href="../easy/themes/default/easyui.css"/><link rel="stylesheet" href="easy/themes/icon.css"/><script type="text/javascript" src="../easy/jquery.min.js"/><script type="text/javascript" src="../easy/jquery.easyui.min.js"/><a href="javascript:;" class="easyui-linkbutton" id="append"> </a><ul id="ul" class="easyui-tree" url="tree.php" checkbox="true" onlyleafcheck="true" lines="true" dnd="true"><!--<li><span> 1</span><ul><li><span> </span><ul><li> </li><li> </li><li> </li><li> </li></ul></li><li><span> </span></li><li><span> </span></li></ul></li><li> 2</li><li> 3</li></ul>--><script>$(function(){$("#append").click(function(){var li = $("#ul").tree("getSelected");if(li) {// $("#ul").tree("append",{parent:li.target,data:[{id:11,text:" 11",},{id:12,text:" 12",},],});}});})</script> 
 <p> </p> 
</ul></div>
                            </div>
                        </div>

좋은 웹페이지 즐겨찾기