Copy codeThe Code is as follows:
<Body bgcolor = "black">
<Script language = "javascript">
Function loadframe (url)
{
Mainone. innerHTML = "<iframe src = '" + url + "'width = '000000' height = '000000'> </iframe> ";
}
Function loadframefrominput (url)
{
Var tmpstr;
Tmpstr = url. value;
Try {
If (tmpstr = "" | tmpstr = "http: //" | tmpstr = "https: //" | tmpstr = "ftp: //")
Mainone. innerHTML = "Please enter URL .";
Else if (tmpstr. indexOf ("http: //")> = 0 | tmpstr. indexOf ("https: //")> = 0 | tmpstr. indexOf ("ftp: //")> = 0)
Mainone. innerHTML = "<iframe src = '" + tmpstr + "'width = '000000' height = '000000'> </iframe> ";
Else
Mainone. innerHTML = "Please enter a valid URL .";
} Catch (err)
{
Mainone. innerHTML = err. description;
}
}
Function contain (str, charset)
{
Var I;
For (I = 0; I <charset. length; I ++)
If (str. indexOf (charset. charAt (I)> = 0)
Return true;
Return false;
}
Function clearframe ()
{
Mainone. innerHTML = "";
}
</Script>
<Font color = white>
<Table border = "0" width = "1000" align = center>
<P>
<Hr/>
<Button onclick = "loadframe ('HTTP: // rss.news.sohu.com/rss/guoji.xml')"> Sohu Int. </button>
<Button onclick = "loadframe ('HTTP: // rss.news.sohu.com/rss/it.xml')"> Sohu IT </button>
<Button onclick = "loadframe ('HTTP: // rss.news.sohu.com/rss/guonei.xml')"> Sohu Nat. </button>
<Button onclick = "loadframe ('HTTP: // www.jb51.net ')"> jb51.net </button>
<Button onclick = "loadframe ('HTTP: // www.baidu.com ')"> baidu </button>
<Button onclick = "loadframe ('HTTP: // www.google.com ')"> Google </button>
<Button onclick = "clearframe ()"> Close </button>
Open a URL: <input id = "urltxt" size = "50" value = "http: //"/> <button onclick = "loadframefrominput (urltxt)"> Go! </Button>
<Hr/>
<Div id = "mainone" width = "100%" hight = "500"> </div>
</Table>
</Font>
</Body>