I checked a lot of articles on disabling subpages to refresh the parent page on the Internet, but it is not clear why it is not suitable for my project.
In the test of a piece of code, it is found that this is suitable for me.
1. Create a function refresh () on the parent page ()
Function refresh () {window. Location. Reload ();}
Parent page refresh Method
2. Use the window. OPEN function to open the child page on the parent page.
3. Use the following method to close the processed data in the background of the child page and refresh the parent page.
String JavaScript = string. format ("<script language = JavaScript> window. opener. refresh (); window. focus (); window. opener = NULL; window. close (); </SCRIPT> "); page. registerstartupscript ("", JavaScript); return;
Subpage: closes the subpage in the background and refreshes the parent page.
The window. opener. Refresh (); Method refresh () is used to call the function refresh () method on the parent page"
In this way, the parent page can be refreshed successfully.