直接上代码:this.setxzqh = function (msg) {
$("#xzqhtree").html("");
//$("#xzqhtree").height((this.rightheight - 30) + "px");
$("#xzqhtree").html(msg.d);
$("#xzqhtree").jstree({
"themes": {
"theme": "classic",
"dots": true,
"icons": false
}, "plugins": ["themes", "html_data", "ui"]
})
.bind("select_node.jstree", function (event, data) {
var num = data.rslt.obj.attr("id");
this.dqxzqh = num;
this.dqxzqhmc = $("#xzqh" + num).html();
postAjax("../service/app.asmx/getxq", "{xqid:'" + num + "',checkedid:'0'}", showxq);
})
.delegate("a", "click", function (event, data) {
event.preventDefault();
});
// $("#xqgltreeLoad").hide(100);
// $("#xqgltreeLoad1").hide(100);
};在这里红色的 dqxzqh和dqxzqhmc ,是这个类当中的属性,本来可以用this.来访问的,但是代码加入 jquery当中,this就变成其他对象了,请教高手,该如何写,才能访问 dqxzqh和dqxzqhmc 的属性
$("#xzqhtree").html("");
//$("#xzqhtree").height((this.rightheight - 30) + "px");
$("#xzqhtree").html(msg.d);
$("#xzqhtree").jstree({
"themes": {
"theme": "classic",
"dots": true,
"icons": false
}, "plugins": ["themes", "html_data", "ui"]
})
.bind("select_node.jstree", function (event, data) {
var num = data.rslt.obj.attr("id");
this.dqxzqh = num;
this.dqxzqhmc = $("#xzqh" + num).html();
postAjax("../service/app.asmx/getxq", "{xqid:'" + num + "',checkedid:'0'}", showxq);
})
.delegate("a", "click", function (event, data) {
event.preventDefault();
});
// $("#xqgltreeLoad").hide(100);
// $("#xqgltreeLoad1").hide(100);
};在这里红色的 dqxzqh和dqxzqhmc ,是这个类当中的属性,本来可以用this.来访问的,但是代码加入 jquery当中,this就变成其他对象了,请教高手,该如何写,才能访问 dqxzqh和dqxzqhmc 的属性
解决方案 »
- label下button的触发问题?
- js控制select
- 谁能把我改改这个logo?我的ps加载不了字体
- var s="^\d{2}\/((0?[1-9])|(1[0-2]))\/((3[0,1])|([1,2][0-9])|(0?[1-9]))$";var re = new RegExp(s);alert(re.test("01/1/1"));的问题
- evalJSON()方法输出的结果为什么是这样,大家进来看!
- event.srcElement.scourceInde兼容问题
- <td id="aaa<%=index%>">abcd</a>,取td的值,令i=<%=inext%>.怎样写这个javascript语句?
- [帮忙]让我头疼的多层Iframe函数调用问题
- 帮帮我
- startdownload传参数,出现乱码!
- 100分。。。json数据在js里面怎么取
- 关于decodeURIComponent无法使用
this.setxzqh = function (msg) {
var that = this;
$("#xzqhtree").html("");
//$("#xzqhtree").height((this.rightheight - 30) + "px");
$("#xzqhtree").html(msg.d);
$("#xzqhtree").jstree({
"themes": {
"theme": "classic",
"dots": true,
"icons": false
}, "plugins": ["themes", "html_data", "ui"]
})
.bind("select_node.jstree", function (event, data) {
var num = data.rslt.obj.attr("id");
that.dqxzqh = num;
that.dqxzqhmc = $("#xzqh" + num).html();
postAjax("../service/app.asmx/getxq", "{xqid:'" + num + "',checkedid:'0'}", showxq);
})
.delegate("a", "click", function (event, data) {
event.preventDefault();
});
// $("#xqgltreeLoad").hide(100);
// $("#xqgltreeLoad1").hide(100);
};试试