日期:2014-05-17 浏览次数:20743 次
d = new dTree('d');
$.ajax({
url:url,
type:'post', //数据发送方式
dataType:'xml', //接受数据格式
error:function(json){
alert( "not lived!");
},
async: false ,
success: function(xml){
$(xml).find("node").each(function(){
var nodeId=$(this).attr("sonId");
var parentId=$(this).attr("rootId");
var type=$(this).attr("type");
var nodeName=$(this).text();
d.add(nodeId,parentId,nodeName,"javascript:getKnowledge( 怎么把type跟nodeId一起传到方法中function getKnowledge(id,type));" ,"","","","",false);
});
}
});
document.write(d);
//-->
function getKnowledge(id,type){
alert(type);
if(type==1){
window.location = "${contextPath}/knowledge/getKnowledgeCrm.do?nodeNewId="+id;
}