1. How to create a hyperlink in javasript
2, applied to tree control event processing in Ext
tree_03.js
Ext.onReady(function() {
var root = new Ext.tree.TreeNode({ //tree, there is no function here, use json format
id:1,
text: "linjq"
});
var c1 = new Ext.tree.TreeNode({
text:"child 1"
});
root.appendChild(c1);
root.appendChild(new Ext.tree.TreeNode( {
text:"child 2"}));
var tree = new Ext.tree.TreePanel({
width:100,
renderTo:"content",
root:root
});
// c1.on("click",function(node,event){alert(node.text);});
// c1.on ("click",function(){document.write('
index.jsp')});
c1.on("click",function (){location.href="index.jsp"});
});