1, my page structure is like this:
2. After logging in, framRight jumps to welcome.aspx. Now I want to refresh top.aspx in welcome.aspx so that the login name can be displayed in top.aspx.
But it doesn’t work no matter how I do it, please help me. .
My writing method:
After logging in, in welcome.aspx:
I’ve tried all the methods you mentioned below, but they don’t work. . . . .
The problem is finally solved:
The method you provided above is based on the fact that the current page and the page to be refreshed are in the same frameset, and my page is not in the current frameset, so it cannot be refreshed across domains. You must find the frameset where the target page is located. .
document.getElementsByName("framHeader")[0].window.location.reload();
getElementsByName
Students, please read the method name carefullydocument.getElementsByName("framHeader") gets an array
You can try this statement
document.getElementsByTagName('framHeader')[0].contentWindow.location.reload();
I asked you to use so much jquery, getElementsByName returns an array