栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > JavaScript

在你的网页中嵌入外部网页的方法

JavaScript 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

在你的网页中嵌入外部网页的方法

Description: Using a tabbed interface, this DHTML script lets you display external web pages inline on your page, with the help of the Iframe tag. We threw in a feature that allows the user to also load the webpage in the entire browser window when desired. This script works in IE5+ and NS6+, and degrades well with the rest (as tabs are simply regular links). Cool! 
Step 1: Add the below CSS and DHTML script to the  section of your page:
复制代码 代码如下:
 
 

#tablist{ 
padding: 3px 0; 
margin-left: 0; 
margin-bottom: 0; 
margin-top: 0.1em; 
font: bold 12px Verdana; 


#tablist li{ 
list-style: none; 
display: inline; 
margin: 0; 


#tablist li a{ 
text-decoration: none; 
padding: 3px 0.5em; 
margin-left: 3px; 
border: 1px solid #778; 
border-bottom: none; 
background: white; 


#tablist li a:link, #tablist li a:visited{ 
color: navy; 


#tablist li a:hover{ 
color: #000000; 
background: #C1C1FF; 
border-color: #227; 


#tablist li a.current{ 
background: lightyellow; 


 

 
To customize the look of the tabs (ie: color), edit the CSS. There is no need to modify the script at all.
Step 2: Add the below code to the  section of your page:
复制代码 代码如下:
 

  • Google
  •  
  • Yahoo
  •  
  • MSN
  •  
  • News.com
  •  
  • Dynamic Drive
  •  
     
     

     
    The above HTML code renders the tab links and Iframe tag used to contain the external documents. Change the URLs to your own. Now, if you have lots of tab links, you can get them to appear on separate lines, by adding a divider: 复制代码 代码如下:
     
  • Google
  •  
  • Yahoo
  •  
  • MSN
  •  
     
  • News.com
  •  
  • Dynamic Drive
  •  
     

    转载请注明:文章转载自 www.mshxw.com
    本文地址:https://www.mshxw.com/it/120292.html
    我们一直用心在做
    关于我们 文章归档 网站地图 联系我们

    版权所有 (c)2021-2022 MSHXW.COM

    ICP备案号:晋ICP备2021003244-6号