1, my page structure is like this:
<frameset rows="72,*,16" border="1" framespacing="0" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<frame name="framHeader" src="top.aspx" scrolling="no" border="0" frameborder="no" noresize topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"></frame>
<frameset name="framMain" cols="250,*" border="0" frameborder="0" framespacing="1" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<frame name="framLeft" src="Left.html" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" frameborder="0" scrolling="no" noresize></frame>
<frame name="framRight" src="right.html" frameborder="0" bordercolor="#e4e4e4" noresize></frame>
</frameset>
<frame name="framFooter" src="foot.html" marginwidth="0" marginheight="0" frameborder="no" scrolling="no" noresize>
</frameset>
<noframes></noframes>
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:
<p>
<script>
document.getElementsByName("framHeader").window.location.reload();
</script>
</p>
I’ve tried all the methods you mentioned below, but they don’t work. . . . .
为情所困2017-07-05 11:06:26
The problem is finally solved:
<script>
window.parent.parent.frames["framHeader"].window.location.reload();
</script>
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. .
女神的闺蜜爱上我2017-07-05 11:06:26
You can try this statementdocument.getElementsByTagName('framHeader')[0].contentWindow.location.reload();
phpcn_u15822017-07-05 11:06:26
I asked you to use so much jquery, getElementsByName returns an array