javascript 写的tab页代码
来源:互联网 发布:girls day 知乎 编辑:程序博客网 时间:2024/06/04 18:01
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Javascript Tab 页测试</title>
<style>
div.activetab
{
position: absolute;
padding:5px;
text-align:center;
vertital-align:middle;
cursor:hand;
border:1px solid #000000;
border-bottom:0px;
background-color:#ffffff;
color:#0000ff;
z-index:3;
width: 165px;
height: 30px;
left: 50px;
top: 55px;
}
div.othertab
{
position: absolute;
padding:5px;
text-align:center;
vertital-align:middle;
cursor:hand;
border:1px solid #000000;
background-color:#efefef;
z-index:1;
width: 165px;
height: 30px;
left: 214px;
top: 55px;
color:#000000;
}
div.mainlayer
{
position: absolute;
text-align:center;
vertital-align:middle;
cursor:hand;
border:1px solid #000000;
background-color:#ffffff;
z-index:2;
width:600px;
height:400px;
left:50px;
top:83px;
}
</style>
<script language="javascript">
function ActiveTab(id,src)
{
var oid = 1;
if(id == 1)
oid = 2;
var activeTab = document.all["layer"+id];
var otherTab = document.all["layer"+oid];
//activeTab.style.width = 200;
activeTab.className = "activetab";
otherTab.className ="othertab";
document.all["PlayListFrame"].src = src;
}
</script>
</head>
<body>
<div class="activetab" id="layer1" onclick="ActiveTab(1,'a.htm')">
Tab1
</div>
<div class="othertab" id="layer2" onclick="ActiveTab(2,'b.htm')">
Tab2
</div>
<div class="mainlayer" id="MainLayer">
<iframe id="PlayListFrame" frameborder="0" src="a.htm" style="MARGIN:0px">
</iframe>
</div>
<div style="position: absolute; width: 604px; height: 33px; z-index: 4; left: 48px; top: 18px" id="layer3">
</div>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Javascript Tab 页测试</title>
<style>
div.activetab
{
position: absolute;
padding:5px;
text-align:center;
vertital-align:middle;
cursor:hand;
border:1px solid #000000;
border-bottom:0px;
background-color:#ffffff;
color:#0000ff;
z-index:3;
width: 165px;
height: 30px;
left: 50px;
top: 55px;
}
div.othertab
{
position: absolute;
padding:5px;
text-align:center;
vertital-align:middle;
cursor:hand;
border:1px solid #000000;
background-color:#efefef;
z-index:1;
width: 165px;
height: 30px;
left: 214px;
top: 55px;
color:#000000;
}
div.mainlayer
{
position: absolute;
text-align:center;
vertital-align:middle;
cursor:hand;
border:1px solid #000000;
background-color:#ffffff;
z-index:2;
width:600px;
height:400px;
left:50px;
top:83px;
}
</style>
<script language="javascript">
function ActiveTab(id,src)
{
var oid = 1;
if(id == 1)
oid = 2;
var activeTab = document.all["layer"+id];
var otherTab = document.all["layer"+oid];
//activeTab.style.width = 200;
activeTab.className = "activetab";
otherTab.className ="othertab";
document.all["PlayListFrame"].src = src;
}
</script>
</head>
<body>
<div class="activetab" id="layer1" onclick="ActiveTab(1,'a.htm')">
Tab1
</div>
<div class="othertab" id="layer2" onclick="ActiveTab(2,'b.htm')">
Tab2
</div>
<div class="mainlayer" id="MainLayer">
<iframe id="PlayListFrame" frameborder="0" src="a.htm" style="MARGIN:0px">
</iframe>
</div>
<div style="position: absolute; width: 604px; height: 33px; z-index: 4; left: 48px; top: 18px" id="layer3">
</div>
</body>
</html>
运行效果:
- javascript 写的tab页代码
- 写javascript代码的技巧
- js(JavaScript)代码实现的TAB标签切换效果
- JavaScript原生代码编写选项卡Tab页跳转功能
- JavaScript实现的tab
- javascript的tab标签
- 学习的时候写的javascript代码
- javascript:以前写的xmlhttp池,代码
- 今天写的一点javascript代码
- JavaScript写的序列代码生成器
- 使用 Flow 写更好的 JavaScript 代码
- 第一次自己写的Tab
- jquery写的tab 标签
- JS写的Tab控件
- HTML5--javascript代码实现Tab切换
- 利用jquery写的一个TAB页切换效果
- IE和Firefox完全兼容的Tab代替Enter的Javascript代码
- JavaScript选项卡/页签/Tab的实现
- 各种内部排序方法的比较
- 刚搬到CSDN上入宿
- 从模板和友元看类模板的使用
- IBM:未来五大新技术改变人类生活
- 关于提高自己JAVA水平的十大技术讨论
- javascript 写的tab页代码
- FBI拟斥10亿建全球最大公民特征识别数据库
- windows下一些启动服务的命令
- Qt 读写 中文 文本文件的一些建议
- DDOS 的几种形式
- JAVA中获取访问来源
- C#改IP
- 每个ASP程序员必备的知识
- 上位机