每当单击任何 jsTree 节点时,我都想重定向到某个 mypage.aspx 页面(与 jsTree 节点关联的 ID 将传递给该页面,并且页面将相应地呈现)。我在 jsTree 中遵循了代码。
<script type="text/javascript">
$(function () {
$("#mydiv").jstree({
"plugins": ["themes", "json_data"],
"json_data": {
"ajax": {
"async": false,
// the URL to fetch the data
"url": "../Handlers/HandleRequest.aspx",
"data": function (n) {
return {
"PassID": "<% = UserNameCtrlID %>"
};
}
}
},
// Configuring the search plugin
"search": {},
"types": {},
"ui": { "initially_select": ["node_4"] },
"core": { "initially_open": ["node_2", "node_3"] }
});
});
</script>
提前致谢!