Javascript此对象不支持此操作
错误:
“此对象不支持此操作”
目标是在单击页面中的按钮时关闭子窗口 子
窗口的按钮代码
button type="submit" onclick ="window.parent(dlgClose(dlg))"
它调用 *.js
function dlgClose(dlg)
{
$("dlg").dialog("close");
return false;
}
dgl
是该对象的 id “div”包含放置在母版页内“内容”中的“iframe”,我有一个父窗口,可以在 jquery 对话框中搜索和发布结果,进行更改,保存它,但我似乎无法关闭对话框。
The error:
"this object does not support this action"
The goal is to close a child window upon clicking on a button in a page
Button code of the child window
button type="submit" onclick ="window.parent(dlgClose(dlg))"
It's calling the *.js
function dlgClose(dlg)
{
$("dlg").dialog("close");
return false;
}
dgl
is the id of the "div" that contains an "iframe" placed in a "content" within the master page, I have parent window that searches and posts the results in the jquery dialog, makes changes, saves it and I can't seem to close the dialog.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为您更新代码
//对于对象
//或者如果它和id比
Updated code for you
//for object
//or if its and id than
那个onclick是错误的,它调用的是当前窗口范围内的函数。
这也假设 dlg 是正确的,不确定到底是什么。
That onclick is wrong, it is calling the function in the current window scope.
That also assumes dlg is correct, not sure what that is supposed to be exactly.