0
防止添加重複的節點劍道敲除樹
Before adding nodetext to root node i need to check the existance of nodetext if same nodetext present then show valid message OR get child node of selected rood(node)
$("#appendNode").click(function() {
var selectedNode = treeview.select();
var nodeText = $("#txtnode").val();//node to insert
if (selectedNode.length == 0)
selectedNode = null;
if (nodeText == null || nodeText == "")
return;
/* if(nodetext is exist in childnode of selectedNode)
valid message
else
add node to root
*/
treeview.append({ text: nodeText }, selectedNode);
});