ext js这个论点(ext js this argument)

编程入门 行业动态 更新时间:2024-10-22 23:49:03
ext js这个论点(ext js this argument)

在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

更多推荐

本文发布于:2023-07-23 02:36:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1226530.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:论点   ext   js   argument

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!