在ext-js中,做什么之间有什么区别:
this.combo= new Combo(....)和
var combo = new Combo().另外......在ext js中是否有调试器, System.out.print类功能,我可以随时查看'this'中包含的对象是什么?
In ext-js, what is the difference between doing:
this.combo= new Combo(....)and
var combo = new Combo().Also...is there a debugger, System.out.print kind of functionality in ext js whereby I can see what is the object contained in 'this' at any moment?
最满意答案
chrome开发人员工具中的Console.log()或firefox的firebug等同于System.out.print
如果你在一个函数中,那么“var”将创建一个局部变量,否则它将在全局范围内。 this它在javascript中的工作方式与java相比有所不同。 在JavaScript中,这总是指我们正在执行的函数的“所有者”,或者更确切地说,指向函数是其方法的对象。 这是在javascript中使用this的运行:
javascript中的this关键字
Console.log() in chrome developer's tool or firefox's firebug its equivalent to System.out.print
If you're in a function then "var" will create a local variable, else its on the global scope. As far as this it works abit different in javascript than in java. In JavaScript this always refers to the “owner” of the function we're executing, or rather, to the object that a function is a method of. Here is a run through of using this in javascript:
The this keyword in javascript
更多推荐
发布评论