从kendoWindow获取数据
get data from kendoWindow
目前,我只想打开一个窗口,并获取用户输入的数据值。下面是我的代码:
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
有人有什么建议吗?TIA。
更新:
这是我在调试和检查关闭事件中发现的,但尚不清楚,我如何在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"
//...
OK,明白了——这是我需要的值,尽管这绝对是一种从剑道对话框中获取值的令人费解的方式:
e.sender.element[0].childNodes[1].value
相关文章:
- 使用jquery将mysql数据获取到新的表行中
- 使用createContainer将Meteor数据获取到React Native中时出现问题
- 创建按钮,根据表单字段中的数据获取特定的URL
- 将JSON API数据获取到html
- 将json数据获取到数组中
- 如何将具有多个标签的多个的所有数据获取到一个数组中
- 将状态的 URL 数据获取到模板中
- 如何在jquery中将xml解析数据获取为全局变量
- 在没有JQuery的情况下将JSON数据获取到TVML项目中
- Angular js如何将索引数据获取到另一个模板中
- 如何将PHP Post数据获取到jquery ajax请求中
- 使用javascript中.data()中存储的数据获取变量
- 无法将动态数据获取到 Jquery 饼图中
- 将节点.js neDB 数据获取到变量中
- 更新页面 JSON 数据获取下拉更改
- 将数据绑定到 kendo 下拉列表时,如何将 ajax 响应数据获取到变量
- 画布图像数据获取的值不超过 102,000 个
- 如何通过 JQuery JSON 数据获取 CheckBox(@Html.CheckBox) 的值
- 从html到jquery再到php,再从php到jquery到html,将数据传递到php文件并将数据获取到php文件中
- 如何将Jquery.get中的数据获取到Javascript中的一个变量中