javascript - When the front-end frame is reloaded, why does it keep reporting that there is no location method?
某草草
某草草 2017-07-05 11:04:26
0
6
932

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. . . . .


某草草
某草草

reply all (6)
为情所困

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();

      为情所困

      getElementsByNameStudents, please read the method name carefully

        为情所困

        document.getElementsByName("framHeader") gets an array

          女神的闺蜜爱上我

          You can try this statementdocument.getElementsByTagName('framHeader')[0].contentWindow.location.reload();

            phpcn_u1582

            I asked you to use so much jquery, getElementsByName returns an array

              Latest Downloads
              More>
              Web Effects
              Website Source Code
              Website Materials
              Front End Template
              About us Disclaimer Sitemap
              php.cn:Public welfare online PHP training,Help PHP learners grow quickly!