JS and framework page operation code

Source: Internet
Author: User

1. Refresh the framework
Copy codeThe Code is as follows:
Onload = function ()
{
Try
{
Parent. Link. location. reload ();
}
Catch (e)
{
}
}

2. Get the URL and process the characters
Copy codeThe Code is as follows:
Var url = parent. frames ["right"]. location. href;
// Document. write ('<Font size = "2" color = "red">' + url + "</Font> ");
Url = url. substring (url. indexOf ("TBSW") + 21, url. length );

3. Set the Title
Top.frames.left.doc ument. title = url;
3. Close the top rule
Copy codeThe Code is as follows:
<Script type = "text/javascript">
<! --
Function ctrl ()
{
Var img = document. getElementById ("imgctop ");
Var mainfrm = top. parent. window. frames ["Frame"];
// Alert (mainfrm );
If (mainfrm. rows = "55 ,*")
{
Mainfrm. rows = "0 ,*";
Img. src = "Images/topopen.jpg ";
Img. alt = "Expand the top rule ";
}
Else
{
Mainfrm. rows = "55 ,*";
Img. src = "Images/topclose.jpg ";
Img. alt = "turn off the top rule ";
}
}
// -->
</Script>

4, left and right
Copy codeThe Code is as follows:
<Script type = "text/javascript">
<! --
Function ctrl ()
{
Var img = document. getElementById ("imgctrl ");
If(parent.doc ument. all. bottom. cols = "170,7 ,*")
{
Parent.doc ument. all. bottom. cols = "0, 7 ,*";
Img. src = "Images/open.jpg ";
Img. alt = "Expand left then ";
}
Else
{
Parent.doc ument. all. bottom. cols = "170,7 ,*";
Img. src = "Images/close.jpg ";
Img. alt = "Disable the left rule ";
}
}
// -->
</Script>

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.