<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>EasyUI 測試</title> <link rel="stylesheet" type="text/css" href="../jquery/easyui-themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="../jquery/easyui-themes/icon.css"> <script type="text/javascript" src="../jquery/jquery.js"></script> <script type="text/javascript" src="../jquery/jquery.easyui.min.js"></script> <script type="text/javascript" src="../jquery/easyui-lang-zh_TW.js"></script> </head> <body> <ul id="tree1"></ul> <script language="javascript"> $(document).ready(function(){ $("#tree1").tree({ lines:true, url:"government-3.json", onDblClick:function(node){ var msg="id=" + node.id + " " + node.text + " double clicked"; if (node.attributes) { window.open(node.attributes.url,"_blank"); } else { $.messager.alert("Info",msg); } } }); }); </script> </body> </html>