一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

在你的網(wǎng)頁中嵌入外部網(wǎng)頁的方法

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 <HEAD> section of your page:
復(fù)制代碼 代碼如下:
<style type="text/css"> 
/*Eric Meyer's based CSS tab*/ 

#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; 


</style> 

<script type="text/Javascript"> 

/*********************************************** 
* Tabbed Document Viewer script- ? Dynamic Drive DHTML code library (www.dynamicdrive.com) 
* This notice MUST stay intact for legal use 
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code 
***********************************************/ 

var selectedtablink="" 
var tcischecked=false 

function handlelink(aobject){ 
selectedtablink=aobject.href 
tcischecked=(document.tabcontrol && document.tabcontrol.tabcheck.checked)? true : false 
if (document.getElementById && !tcischecked){ 
var tabobj=document.getElementById("tablist") 
var tabobjlinks=tabobj.getElementsByTagName("A") 
for (i=0; i<tabobjlinks.length; i++) 
tabobjlinks[i].className="" 
aobject.className="current" 
document.getElementById("tabiframe").src=selectedtablink 
return false 

else 
return true 


function handleview(){ 
tcischecked=document.tabcontrol.tabcheck.checked 
if (document.getElementById && tcischecked){ 
if (selectedtablink!="") 
window.location=selectedtablink 



</script> 
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 <BODY> section of your page:
復(fù)制代碼 代碼如下:
<ul id="tablist"> 
<li><a class="current" >Google</a></li> 
<li><a >Yahoo</a></li> 
<li><a >MSN</a></li> 
<li><a >News.com</a></li> 
<li><a >Dynamic Drive</a></li> 
</ul> 
<iframe id="tabiframe" src="http://www.google.com" width="98%" height="350px"></iframe> 

<form name="tabcontrol" style="margin-top:0"> 
<input name="tabcheck" type="checkbox" onClick="handleview()"> Open tab links in browser window instead. 
</form> 
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: 復(fù)制代碼 代碼如下:
<ul id="tablist"> 
<li><a class="current" href="#">Google</a></li> 
<li><a href="#">Yahoo</a></li> 
<li><a href="#">MSN</a></li> 
<div style="margin-bottom: 8px"></div> 
<li><a href="#">News.com</a></li> 
<li><a href="#">Dynamic Drive</a></li> 
</ul> 

JavaScript技術(shù)在你的網(wǎng)頁中嵌入外部網(wǎng)頁的方法,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 国产精品一区伦免视频播放 | 色宅男中文字幕亚洲专区 | 成人福利在线观看免费视频 | 久久精品精品 | 国产高清视频在线 | 91精品导航在线观看 | 国产成人麻豆精品video | 亚洲国产精品自在在线观看 | 91中文字幕在线 | 免费观看一区二区 | 美女无遮挡免费视频 | 看全色黄大色黄女视频 | 日韩二三区| 激情亚洲婷婷 | 亚洲视频国产 | 免费xxxxx在线观看网站 | 久久er国产精品免费观看2 | 久久国产精品高清一区二区三区 | 精品日韩一区二区三区视频 | 萝控喷水视频 | 日本高清色片 | 久久久久国产精品美女毛片 | 伊香蕉| 欧美精品在线免费观看 | 国产成人精品亚洲午夜麻豆 | 一区二区三区高清在线 | 好爽毛片一区二区三区四区 | 欧美日韩不卡码一区二区三区 | 综合色吧 | 91精品日本久久久久久牛牛 | 天天色综合5 | 视频一区在线观看 | 一本色道久久综合一区 | 久久亚洲私人国产精品 | 极品美女国产精品免费一区 | 精品国产福利久久久 | 国产精品亚洲四区在线观看 | 91精品国产福利在线观看性色 | 在线天堂视频 | 日本伊人精品一区二区三区 | 99久久精品免费看国产一区二区三区 |