本人在做一个页面要用到ext tree 如何在单击的时候将url加入,并点击时根据其URl跳转界面
我有循环将所有节点都加入一个onclik事件,但是不知道如何加URl,望各位大神们,有实现过的写上

解决方案 »

  1.   

    L@_@K
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title> new document </title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="generator" content="editplus" />
        <meta name="author" content="[email protected]" />
        <meta name="keywords" content="" />
        <meta name="description" content="" />
    </head><body>
        <div id="googleDiv">
            Google
        </div>
        <script type="text/javascript">
        <!--
    document.getElementById("googleDiv").onclick = function() {
        window.location.href = "http://www.google.com.hk/";
    };
        //-->
        </script>
    </body>
    </html>Web 开发常用手册DHTML 参考手册
    http://download.csdn.net/source/308913JScript 语言参考
    http://download.csdn.net/source/308916CCS 样式表中文手册
    http://download.csdn.net/source/304124
      

  2.   

    楼上,人家明明写的是ext  ,好不好,你那url写法压根就不对!
    var node1 = new Ext.tree.TreeNode({
    text:'用户维护',
    url:'pages/UsersMaintain.jsp'
    });
    这是url跳转页面,要是想带参数啥的就这么写:
    url:'pages/UsersMaintain.jsp?a=a'