Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/455.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 单击jstree节点时打开多个窗口_Javascript_Jquery_Jstree - Fatal编程技术网

Javascript 单击jstree节点时打开多个窗口

Javascript 单击jstree节点时打开多个窗口,javascript,jquery,jstree,Javascript,Jquery,Jstree,我正在尝试使用jstree来填充树,当单击一个节点时,我需要启动一个名为new.html的新窗口,使用cookies来存储节点id的值。它可以工作。但我需要的是,当点击jstree节点时,我需要一个新的new.html窗口并点击另一个节点,而不是更新new.html,我需要另一个具有新节点id的窗口。因此,需要使用new.html为每个节点id创建多个窗口。jquery是否可以这样做?使用下面的空参数就可以了 $(document).ready(function(){ $("#tree

我正在尝试使用jstree来填充树,当单击一个节点时,我需要启动一个名为new.html的新窗口,使用cookies来存储节点id的值。它可以工作。但我需要的是,当点击jstree节点时,我需要一个新的new.html窗口并点击另一个节点,而不是更新new.html,我需要另一个具有新节点id的窗口。因此,需要使用new.html为每个节点id创建多个窗口。jquery是否可以这样做?

使用下面的空参数就可以了

$(document).ready(function(){
     $("#tree").jstree({  
         "xml_data" : {  
             "ajax" : {  
                 "url" : "jstree.xml"            
             },  

             "xsl" : "nest"

             },  
    "themes" : {  

             "theme" : "classic",  

            "dots" : true,  

             "icons" : true 

         },  
          "ui": {
            "initially_select" : [ "#1234" ] 
       },
    "search" : {  

              "case_insensitive" : true,  

                 "ajax" : {  

                     "url" : "tree.xml" 

                 }  

             }, 
    "plugins" : ["themes", "xml_data", "ui","types", "search", "cookies"],
    "core" : { "initially_open" : [ "12345" ] } 
    }).bind("select_node.jstree", function (event, data) {
            var node_id = data.rslt.obj.attr("id");
            $.cookie("example", node_id, { path: '/', expires:7 });
            window.open('new.html', '_newtab','width=800,height=1000,resizable=1,scrollbars=1');

    });
window.open('new.html', '','width=800,height=1000,resizable=1,scrollbars=1');