Home > Article > Web Front-end > A dialog pops up on the page and I want to get the value of the child page from the parent page. What should I do?
A function has recently been developed. Click the Add button to pop up a box that supports multiple selections. Then you need to get the ID of the selected row. The dialog is juqery's dialog, and the front-end framework uses easyUI. The solution is as follows:
var win = this.iframe.contentWindow;//获取当前iframe所在的window对象。 var doc = win.document;//得到document对象。 var checked = win.$('#mycustormerGridTable').datagrid('getChecked');//获取子页面选中的行 for (var i = 0; i < checked.length; i++) { if (selectedIds.indexOf(checked[i].custNo) == -1) { selectedIds.push(checked[i].custNo); } }
For more related tutorials, please visit JavaScript Video Tutorial