博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
My Desktop :)
阅读量:4120 次
发布时间:2019-05-25

本文共 1644 字,大约阅读时间需要 5 分钟。

  1. <body bgcolor="black">
  2. <script language = "javascript">
  3. function loadframe(url)
  4. {
  5.     mainone.innerHTML = "<iframe src='" + url + "' width='100%' height='500'></iframe>";
  6. }
  7. function loadframefrominput(url)
  8. {
  9.     var tmpstr;
  10.     tmpstr = url.value;
  11.     try{
  12.     if(tmpstr==""||tmpstr=="http://"||tmpstr=="https://"||tmpstr=="ftp://")
  13.         mainone.innerHTML = "Please enter URL.";
  14.     else if(tmpstr.indexOf("http://")>=0||tmpstr.indexOf("https://")>=0||tmpstr.indexOf("ftp://")>=0)
  15.         mainone.innerHTML = "<iframe src='" + tmpstr + "' width='100%' height='500'></iframe>";
  16.     else
  17.         mainone.innerHTML = "Please enter a valid URL.";
  18.     }catch(err)
  19.     {
  20.         mainone.innerHTML = err.description;
  21.     }
  22. }
  23. function  contain(str,charset)
  24. {  
  25.     var  i;
  26.     for(i=0;i<charset.length;i++)
  27.         if(str.indexOf(charset.charAt(i))>=0)
  28.             return  true;
  29.         return  false;
  30. function clearframe()
  31. {
  32.     mainone.innerHTML = "";
  33. }
  34. </script>
  35. <font color=white>
  36. <table border="0" width="1000" align=center>
  37. <p>
  38.   <hr/>
  39.   <button onclick="loadframe('http://rss.news.sohu.com/rss/guoji.xml')">Sohu Int.</button> 
  40.   <button onclick="loadframe('http://rss.news.sohu.com/rss/it.xml')">Sohu IT</button> 
  41.   <button onclick="loadframe('http://rss.news.sohu.com/rss/guonei.xml')">Sohu Nat.</button> 
  42.   <button onclick="loadframe('http://www.cnbeta.com/backend.php')">cnBeta</button> 
  43.   <button onclick="loadframe('http://www.baidu.com')">baidu</button> 
  44.   <button onclick="loadframe('http://www.google.com')">Google</button> 
  45.   <button onclick="clearframe()">Close</button> 
  46.   Open a URL:  <input id="urltxt" size="50" value="http://"/> <button onclick="loadframefrominput(urltxt)"> Go! </button>
  47.   <hr/>
  48.   <div id="mainone" width="100%" hight="500"></div>
  49.  </table>
  50.  
  51.  
  52.  </font>
  53.  </body>

转载地址:http://fwipi.baihongyu.com/

你可能感兴趣的文章
Climbing Stairs 爬楼梯方法 动态规划
查看>>
Merge Two Sorted Lists 合并两个有序链表
查看>>
pow(x,n) 为什么错这么多次
查看>>
Jump Game 动态规划
查看>>
Binary Tree Maximum Path Sum 自底向上求解(重重重重)
查看>>
Subsets 深搜
查看>>
Subsets II
查看>>
Edit Distance 字符串距离(重重)
查看>>
Gray Code 格雷码
查看>>
对话周鸿袆:从程序员创业谈起
查看>>
web.py 0.3 新手指南 - 如何用Gmail发送邮件
查看>>
web.py 0.3 新手指南 - RESTful doctesting using app.request
查看>>
web.py 0.3 新手指南 - 使用db.query进行高级数据库查询
查看>>
web.py 0.3 新手指南 - 多数据库使用
查看>>
一步步开发 Spring MVC 应用
查看>>
python: extend (扩展) 与 append (追加) 的差别
查看>>
「译」在 python 中,如果 x 是 list,为什么 x += "ha" 可以运行,而 x = x + "ha" 却抛出异常呢?...
查看>>
浅谈JavaScript的语言特性
查看>>
LeetCode第39题思悟——组合总和(combination-sum)
查看>>
LeetCode第43题思悟——字符串相乘(multiply-strings)
查看>>