一区二区久久-一区二区三区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)系我們修改或刪除,多謝。

主站蜘蛛池模板: 国产手机在线国内精品 | 四虎永久免费最新在线 | 最近中文字幕无吗免费视频 | 亚洲欧洲精品成人久久曰影片 | 国产精品99一区二区三区 | 免费人成在线蜜桃视频 | 亚洲欧洲免费 | www.色哟哟| 亚洲视频一区二区 | 国产亚洲精品拍拍拍拍拍 | 一级做a爰片久久毛片美女 一级做a爰片久久毛片人呢 | 欧美日韩亚洲国产无线码 | 奇米色吧 | 丁香六月婷婷七月激情 | 久久免费区一区二区三波多野 | 911国内自产亚洲第一 | 国产++欧洲韩国野花视频 | 香港aa三级久久三级 | 欧美另类videosbestv| 国产精品手机在线观看 | 亚洲激情黄色小说 | 国产美女久久久久 | 国产精品2020| 伊人伊成久久人综合网777 | 亚洲精品国产精品国自产 | 国产精品自拍亚洲 | 欧美日韩中文国产一区二区三区 | 四虎最新网 | 国内精品久久久久久野外 | 99免费精品视频 | 九色91精品国产网站 | 91新视频| 婷婷射 | 国产女人伦码一区二区三区不卡 | 日韩中文有码高清 | 中文字幕一区视频一线 | 欧美人禽交视频免费观看 | 成年网站在线播放 | 欧美综合视频 | 亚洲天堂五月天 | 成人免费观看视频 |