Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Backbone.js-在devTools中获取要打印的childElementCount值_Backbone.js_Marionette_Children_Document Body - Fatal编程技术网

Backbone.js-在devTools中获取要打印的childElementCount值

Backbone.js-在devTools中获取要打印的childElementCount值,backbone.js,marionette,children,document-body,Backbone.js,Marionette,Children,Document Body,我试图在chrome开发工具中记录childElementCount属性,但未定义 这是我的代码: console.log('childElementCount---', this.ui.tbody.get('childElementCount') 返回未定义的子元素计数 为什么它没有定义 jQuery用于从jQuery对象检索底层DOM元素。它接受整数索引而不是字符串。 尝试this.ui.tbody.get(0).childElementCount或this.ui.tbody.get(0)

我试图在chrome开发工具中记录
childElementCount
属性,但未定义

这是我的代码:

console.log('childElementCount---', this.ui.tbody.get('childElementCount')
返回未定义的子元素计数

为什么它没有定义

jQuery用于从jQuery对象检索底层DOM元素。它接受整数索引而不是字符串。 尝试
this.ui.tbody.get(0).childElementCount
this.ui.tbody.get(0).getAttribute('childElementCount')

或者使用jQuery:

this.ui.tbody.prop('childElementCount')
this.ui.tbody.children().length