这个demo只能给全部的节点加单击事件
如何只给node111加单击事件?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
<link rel="stylesheet" type="text/css" href="../demo.css">
<script type="text/javascript" src="../../jquery.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
<ul id="tree">
</ul>
<script type="text/javascript">
$(function() {
$('#tree').tree({
data: [{
"text": "node1",
"children": [{
"text": "node11",
"children": [{
"text": "node111"
}]
}]
}],
"onClick": function() {
alert(1);
}
});
});
</script>
</body>
</html>