My Desktop :) Desktop code

Source: Internet
Author: User

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>

Related Article

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.