The method by which the jQuery child form gets the parent form element

  • 2020-06-12 08:29:07
  • OfStack

This article illustrates how an jQuery child form retrieves a parent form element. Share to everybody for everybody reference. The details are as follows:

$("# Parent window element ID",window.parent.document);

Corresponding javascript version is

window.parent.document.getElementById(" Parent window element ID");

Get the element method of the parent window:

$(selector, window.parent.document);

The element of the parent window can be taken using:

$(selector, window.parent.parent.document);

Similarly, the method of fetching other Windows is much the same
Gets the iframe parent form element:

$(selector, window.parent.document);

Get the parent form opened with () :

$(selector, window.opener.document);

Gets the parent form opened with showModelDialog() :

$(selector, window.dialogArguments.document);

Used to refresh the entire page of the parent window:


window plug-in closes the window, similar to window.close () :


Refresh the list of id "4thEditTable" on the parent page (partial refresh) :

parent.$("#4thEditTable").load(window.parent.location.href+" #4thEditTable");

I hope this article has been helpful for your jQuery programming.

Related articles: