简体   繁体   English

从活动对象获取数据

[英]Get data from live object

Here is my situation: I got a Webclient, in this Webclient is an input field. 这是我的情况:我有一个Webclient,在此Webclient中是一个输入字段。 What I need, is to get the live data from this input. 我需要的是从此输入获取实时数据。

I need that string in Description which is sd . 我需要在Description中的那个字符串是sd

console.log($("#grid").data("kendoGrid")._data);

And this show me what I want to see: 这向我展示了我想看到的:

对象中的数据,我需要什么

But I cant get Access to it. 但是我无法访问它。 Someone told me this: 有人告诉我:

You are trying to access that array or object before it is populated. 您正在尝试访问该数组或对象,然后再对其进行填充。 What you were seeing in console is a live object not a snapshot. 您在控制台中看到的是一个实时对象,而不是快照。

But I still don't know how to access them. 但是我仍然不知道如何访问它们。

Yes I did searching, but I didn't find anything. 是的,我确实做了搜索,但没有找到任何东西。

I know, I need to store the sd , but really don't know how. 我知道,我需要存储sd ,但实际上不知道如何。

Here is my previous question: get data from object - i see the data but cant save them . 这是我以前的问题: 从对象获取数据-我看到了数据但无法保存它们

Can anyone help me? 谁能帮我?

Best regards. 最好的祝福。

尝试这个 :

console.log($("#grid").data("kendoGrid")._data[0].Description);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM