作家
登录

My Desktop :) 桌面式代码

作者: 来源:www.28hudong.com 2013-03-30 02:46:58 阅读 我要评论

复制代码 代码如下:<body bgcolor="black"> <script language = "javascript"> function loadframe(url) { mainone.innerHTML = "<iframe src='" + url + "' width='100%' height='500'></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='100%' height='500'></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>

  推荐阅读

  jquery 插件之仿“卓越亚马逊”首页弹出菜单效果

复制代码 代码如下:/*弹出式菜单*/ //没剑 2008-07-03 //http://regedit.cnblogs.com /*参数说明*/ //showobj:要显示的菜单ID //timeout:延时时间,鼠标停留/离开后延时多久开始显示/隐藏菜单 //speed:菜单显示速>>>详细阅读


本文标题:My Desktop :) 桌面式代码

地址:http://www.17bianji.com/kaifa2/JS/29076.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)