JS has frame page jump (target) Three cases of application _javascript skills

Source: Internet
Author: User
1. Jump out of the frame in the parent page.
Jsp:
Copy Code code as follows:

<script language= "JavaScript" >
Window.parent.frames.location.href= ". /welcome.en "
</script>

Java:
Copy Code code as follows:

PrintWriter out = Response.getwriter ();
Out.write ("<script type= ' text/javascript ' >window.parent.frames.location.href = '. /welcome.en ';</script> ');
Return

2. Jump from one frame to the name= "main" frame.
Copy Code code as follows:

<script language= "JavaScript" >
var key = document.getElementById ("# #"). Value;
Window.parent.main location.href= "Welcome.en? key= "+ key;
</script>

3.ContentList the IFRAME name of the current page
Copy Code code as follows:

Window. ContentList.location.href = '.. /welcome.en ';

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.