Method for obtaining the element of the parent form from a jQuery subform.
This example describes how to obtain the element of the parent form from a jQuery subform. Share it with you for your reference. The details are as follows:
$ ("# Parent window element ID", specify parent parent.doc ument );
The corresponding javascript version is
Optional bytes parent.doc ument. getElementById ("parent window element ID ");
Method for retrieving elements of the parent window:
$(selector, window.parent.document);
You can use the following elements to retrieve the parent window of the parent window:
$(selector, window.parent.parent.document);
Similarly, the method for retrieving other windows is similar.
Obtain the iframe parent form element:
$(selector, window.parent.document);
Obtain the parent form opened through windows. open:
$(selector, window.opener.document);
Obtain the parent form opened through showModelDialog:
$(selector, window.dialogArguments.document);
Used to refresh the entire page of the parent window:
window.parent.location.reload();
Window plug-in closes the window, similar to window. close ():
parent.subWindow_add.Close();
Refresh the list with the id of "4thEditTable" on the parent page (partial refresh ):Copy codeThe Code is as follows: parent. $("#4 thEditTable"). load (window. parent. location. href + "#4 thEditTable ");
I hope this article will help you with jQuery programming.