The example in this article describes how a jQuery subform obtains parent form elements. Share it with everyone for your reference. The details are as follows:
$("#父窗口元素ID",window.parent.document);
is
window.parent.document.getElementById("父窗口元素ID");
Get the element method of the parent window:
$(selector, window.parent.document);
To get the element of the parent window of the parent window, you can use:
$(selector, window.parent.parent.document);
Similarly, the method of selecting other windows is similar
Get iframe parent form element:
$(selector, window.parent.document);
Get the parent form opened through windows.open():
$(selector, window.opener.document);
Get the parent form opened through showModelDialog():
$(selector, window.dialogArguments.document);
Used to refresh the entire page of the parent window:
window.parent.location.reload();
The window plug-in closes the window, similar to window.close():
parent.subWindow_add.Close();
Refresh the list with the id "4thEditTable" in the parent page (partial refresh):
I hope this article will be helpful to everyone’s jQuery programming.