Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/79.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
Javascript 从kendoWindow获取数据_Javascript_Jquery_Asp.net Mvc_Kendo Ui - Fatal编程技术网

Javascript 从kendoWindow获取数据

Javascript 从kendoWindow获取数据,javascript,jquery,asp.net-mvc,kendo-ui,Javascript,Jquery,Asp.net Mvc,Kendo Ui,目前,我只想打开一个窗口,获取用户输入的数据值。这是我的密码: function execGetKey() { var win = $('#w').kendoWindow({ modal: true, resizable: false, title: 'Please Enter a Key', visible: false, activate: function () { $('#t'

目前,我只想打开一个窗口,获取用户输入的数据值。这是我的密码:

function execGetKey() {
    var win = $('#w').kendoWindow({
        modal: true,
        resizable: false,
        title: 'Please Enter a Key',
        visible: false,
        activate: function () {
            $('#t').select();
        },
        editItem: function(e) {
            var dataItem = this.dataItem($(e.target).closest("tr"));
            kendo.bind($("#w"), dataItem);
            e.preventDefault();
            kendo.bind(win, dataItem);
        },
        close: function (e) {
            console.log("win:");
            for (var prop in win) {
                if (win.hasOwnProperty(prop)) {
                    console.log(prop);
                    console.log(win[prop]);
                }
            }
            console.log("e:");
            for (var prop in e) {
                if (e.hasOwnProperty(prop)) {
                    console.log(prop);
                    console.log(e[prop]);
                }
            }  
        }
    }).data('kendoWindow');
    win.center().open();   
}
以下是kendoWindow上的所有属性,但在这些属性中,我找不到用户输入的值:

match.config.js:640 element
match.config.js:641 [div#w.k-window-content.k-content, context: div#w.k-window-content.k-content]
match.config.js:640 _events
match.config.js:641 Object {activate: Array[1], close: Array[1]}
match.config.js:640 options
match.config.js:641 Object {prefix: "", name: "Window", animation: Object, title: "Please Enter a Key", actions: Array[1]…}
match.config.js:640 appendTo
match.config.js:641 [body, prevObject: A.fn.init[1], context: document, selector: "body"]
match.config.js:640 wrapper
match.config.js:641 [div.k-widget.k-window, prevObject: A.fn.init[1], context: div#w.k-window-content.k-content]
match.config.js:640 dragging
match.config.js:641 s {owner: c.e…d.init, _draggable: _.e…d.init}
match.config.js:640 touchScroller
match.config.js:641 false
match.config.js:640 _resizeHandler
match.config.js:641 jQuery.extend.proxy.proxy()
match.config.js:640 _marker
match.config.js:641 97742b0d
match.config.js:640 _closing
match.config.js:641 false
有人有什么建议吗?蒂亚

更新:

这是我在调试和检查关闭事件上的e时发现的,但不清楚,如何在js代码中访问这个10117434-000值

c.e…d.init {element: A.fn.init[1], _events: Object, options: Object, appendTo: A.fn.init[1], wrapper: A.fn.init[1]…}
   //...
   element: A.fn.init[1]0: div#w.k-window-content.k-content
      //...
      childNodes: NodeList[3]
          0: textbaseURI: "http://localhost:41678/Match.mvc/Config"childNodes: NodeList[0]length: 0__proto__: NodeListdata:        //...
          1: input#taccept: ""accessKey: "" 
              //...
              value: "10117434-000"
              //...

好的,这是我需要的值,虽然这看起来确实像是一种从剑道对话中获取值的复杂方式:

e.sender.element[0].childNodes[1].value

当窗口仍然打开时,只需使用输入ID选择即可直接获取输入值。然后$'windowInput'。我尝试将其放入上面的editItem函数中,但由于某些原因,我仍然得到一个TypeError。