无为清净楼资源网 Design By www.qnjia.com
滑动门:我不理解为什么这样叫。
我就命名为:JMenuTab吧,因为写它是为了当我的菜单。
IE6,FireFox下测试通过。
复制代码 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="JTabRes1/JMenuTab.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
margin: 0px;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200"> </td>
<td id="menuBar"></td>
</tr>
</table>
<div id="page1">大大小小多多少少<br />
人口手足</div>
<div id="page2">ABCDEFG</div>
<div id="page3"><img src="/UploadFiles/2021-04-02/loading.gif"><div id="pageHelp"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>JMenuTab 帮助:</td>
</tr>
<tr>
<td>Author:xling Blog:http://xling.blueidea.com 2007/05/23 </td>
</tr>
<tr>
<td>写这个程序只是为了解决燃眉之急(汉,虽然是急,我还是写了一天)!</td>
</tr>
<tr>
<td>程序中用到图片是修改了网上现有图片,所以,外表和某些网站上的一样,请不要见怪。因为除了图片,全是原创(不曾参考任何类似程序)!</td>
</tr>
<tr>
<td>IE6,Firefox下测试通过。</td>
</tr>
<tr>
<td>调用方法(注意顺序):</td>
</tr>
<tr>
<td>var menuTab = new JMenuTab(null,null,"menuBar");<br />
menuTab.create();<br />
menuTab.addTab("首页");<br />
menuTab.addTab("组织架构","page1");<br />
menuTab.addTab("员工信息","page2");<br />
menuTab.addTab("业务知识","page3");
<br />
menuTab.addTab("Help","pageHelp");<br />
menuTab.setActiveTab(2);</td>
</tr>
</table>
</div>
</body>
</html>
<script language="javascript" type="text/javascript">
function JMenuTab(pWidth,pHeight,pBody){
var self = this;
//________________________________________________
var width = pWidth;
var height = pHeight;
var titleHeight = 24;
//________________________________________________
var oOutline = null;
var oTitleOutline = null;
var oPageOutline = null;
var oTitleArea = null;
var oPageArea = null;
var tabArray = new Array();
var activedTab = null;
//________________________________________________
var $ = function(pObjId){
return document.getElementById(pObjId);
}
//________________________________________________
var body = $(pBody) || document.body;
//________________________________________________
var htmlObject = function(pTagName){
return document.createElement(pTagName);
}
//________________________________________________
var isRate = function(pRateString){
if(!isNaN(pRateString)) return false;
if(pRateString.substr(pRateString.length-1,1) != "%")
return false;
if(isNaN(pRateString.substring(0,pRateString.length - 1)))
return false;
return true;
}
//________________________________________________
var createOutline = function(){
oOutline = htmlObject("DIV");
body.appendChild(oOutline);
oOutline.className = "oOutline";
}
//________________________________________________
var createTitleOutline = function(){
oTitleOutline = htmlObject("DIV");
oOutline.appendChild(oTitleOutline);
oTitleOutline.className = "oTitleOutline";
var vTable = htmlObject("TABLE");
oTitleOutline.appendChild(vTable);
vTable.width = "100%";
vTable.border = 0;
vTable.cellSpacing = 0;
vTable.cellPadding = 0;
var vTBody = htmlObject("TBODY");
vTable.appendChild(vTBody);
var vTr1 = htmlObject("TR");
vTBody.appendChild(vTr1);
var vTdTopLeft = htmlObject("TD");
vTr1.appendChild(vTdTopLeft);
vTdTopLeft.height = titleHeight;
vTdTopLeft.className = "oTopLeft";
oTitleArea = htmlObject("TD");/////////////////////////////////
vTr1.appendChild(oTitleArea);
oTitleArea.className = "oTitleArea";
var vTdTopRight = htmlObject("TD");
vTr1.appendChild(vTdTopRight);
vTdTopRight.className = "oTopRight";
}
this.setTitleHeight = function(pHeight){
//设置标题区域的高度
}
//________________________________________________
var tabBtn_click = function(){
self.setActiveTab(this.index);
}
var tabBtn_mouseover = function(){
if(this.className =="oTabBtnActive")
return;
this.className = "oTabBtnHover";
}
var tabBtn_mouseout = function(){
if(this.className =="oTabBtnActive")
return;
this.className = "oTabBtn";
}
//________________________________________________
var createTabBtn = function(pLabel,pTabPage){
var vTabBtn = htmlObject("DIV");
oTitleArea.appendChild(vTabBtn);
vTabBtn.className = "oTabBtn";
vTabBtn.index = tabArray.length;
vTabBtn.tabPage = pTabPage;
vTabBtn.onclick = tabBtn_click;
vTabBtn.onmouseover = tabBtn_mouseover;
vTabBtn.onmouseout = tabBtn_mouseout;
tabArray.push(vTabBtn);
var vTabBtnL = htmlObject("DIV");
vTabBtn.appendChild(vTabBtnL);
vTabBtnL.className = "oTabBtnLeft";
vTabBtnC = htmlObject("DIV");
vTabBtn.appendChild(vTabBtnC);
vTabBtnC.className = "oTabBtnCenter";
vTabBtnC.innerHTML = pLabel;
vTabBtnR = htmlObject("DIV");
vTabBtn.appendChild(vTabBtnR);
vTabBtnR.className = "oTabBtnRight";
}
var createPageOutline = function(){
oPageOutline = htmlObject("DIV");
oOutline.appendChild(oPageOutline);
oPageOutline.className = "oPageOutline";
var vTable = htmlObject("TABLE");
oPageOutline.appendChild(vTable);
vTable.width = "100%";
vTable.border = 0;
vTable.cellSpacing = 0;
vTable.cellPadding = 0;
vTable.style.borderCollapse = "collapse";
vTable.style.tableLayout="fixed";
var vTBody = htmlObject("TBODY");
vTable.appendChild(vTBody);
var vTr1 = htmlObject("TR");
vTBody.appendChild(vTr1);
var vTdBottomLeft = htmlObject("TD");
vTr1.appendChild(vTdBottomLeft);
vTdBottomLeft.className = "oBottomLeft";
vTdBottomLeft.rowSpan = 2;
oPageArea = htmlObject("TD");///////////////////////////////////////
vTr1.appendChild(oPageArea);
oPageArea.className = "oPageArea";
if(oPageArea.filters)
oPageArea.style.cssText = "FILTER: progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0, motion='forward');";
oPageArea.height = 10;
var vTdBottomRight = htmlObject("TD");
vTr1.appendChild(vTdBottomRight);
vTdBottomRight.className = "oBottomRight";
vTdBottomRight.rowSpan = 2;
var vTr2 = htmlObject("TR");
vTBody.appendChild(vTr2);
var vTdBottomCenter = htmlObject("TD");
vTr2.appendChild(vTdBottomCenter);
vTdBottomCenter.className = "oBottomCenter";
}
//________________________________________________
this.addTab = function (pLabel,pPageBodyId){
createTabBtn(pLabel,pPageBodyId);
if($(pPageBodyId)){
oPageArea.appendChild($(pPageBodyId));
$(pPageBodyId).style.display = "none";
}
}
//________________________________________________
this.setActiveTab = function(pIndex){
if(oPageArea.filters)
oPageArea.filters[0].apply();
if(activedTab != null){
activedTab.className = "oTabBtn";
if($(activedTab.tabPage))
$(activedTab.tabPage).style.display = "none";
}
activedTab = tabArray[pIndex];
activedTab.className = "oTabBtnActive";
if($(activedTab.tabPage))
$(activedTab.tabPage).style.display = "";
if(oPageArea.filters)
oPageArea.filters[0].play(duration=1);
};
//________________________________________________
this.create = function(){
createOutline();
createTitleOutline();
createPageOutline();
}
}
var menuTab = new JMenuTab(null,null,"menuBar");
menuTab.create();
menuTab.addTab("首页");
menuTab.addTab("组织架构","page1");
menuTab.addTab("员工信息","page2");
menuTab.addTab("业务知识","page3");
menuTab.addTab("ISO系统");
menuTab.addTab("办公环境");
menuTab.addTab("公司新闻");
menuTab.addTab("公共政策");
menuTab.addTab("链接总部");
menuTab.addTab("Help","pageHelp");
menuTab.setActiveTab(2);
</script>
请下载源码察看效果。
我就命名为:JMenuTab吧,因为写它是为了当我的菜单。
IE6,FireFox下测试通过。
复制代码 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="JTabRes1/JMenuTab.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
margin: 0px;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200"> </td>
<td id="menuBar"></td>
</tr>
</table>
<div id="page1">大大小小多多少少<br />
人口手足</div>
<div id="page2">ABCDEFG</div>
<div id="page3"><img src="/UploadFiles/2021-04-02/loading.gif"><div id="pageHelp"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>JMenuTab 帮助:</td>
</tr>
<tr>
<td>Author:xling Blog:http://xling.blueidea.com 2007/05/23 </td>
</tr>
<tr>
<td>写这个程序只是为了解决燃眉之急(汉,虽然是急,我还是写了一天)!</td>
</tr>
<tr>
<td>程序中用到图片是修改了网上现有图片,所以,外表和某些网站上的一样,请不要见怪。因为除了图片,全是原创(不曾参考任何类似程序)!</td>
</tr>
<tr>
<td>IE6,Firefox下测试通过。</td>
</tr>
<tr>
<td>调用方法(注意顺序):</td>
</tr>
<tr>
<td>var menuTab = new JMenuTab(null,null,"menuBar");<br />
menuTab.create();<br />
menuTab.addTab("首页");<br />
menuTab.addTab("组织架构","page1");<br />
menuTab.addTab("员工信息","page2");<br />
menuTab.addTab("业务知识","page3");
<br />
menuTab.addTab("Help","pageHelp");<br />
menuTab.setActiveTab(2);</td>
</tr>
</table>
</div>
</body>
</html>
<script language="javascript" type="text/javascript">
function JMenuTab(pWidth,pHeight,pBody){
var self = this;
//________________________________________________
var width = pWidth;
var height = pHeight;
var titleHeight = 24;
//________________________________________________
var oOutline = null;
var oTitleOutline = null;
var oPageOutline = null;
var oTitleArea = null;
var oPageArea = null;
var tabArray = new Array();
var activedTab = null;
//________________________________________________
var $ = function(pObjId){
return document.getElementById(pObjId);
}
//________________________________________________
var body = $(pBody) || document.body;
//________________________________________________
var htmlObject = function(pTagName){
return document.createElement(pTagName);
}
//________________________________________________
var isRate = function(pRateString){
if(!isNaN(pRateString)) return false;
if(pRateString.substr(pRateString.length-1,1) != "%")
return false;
if(isNaN(pRateString.substring(0,pRateString.length - 1)))
return false;
return true;
}
//________________________________________________
var createOutline = function(){
oOutline = htmlObject("DIV");
body.appendChild(oOutline);
oOutline.className = "oOutline";
}
//________________________________________________
var createTitleOutline = function(){
oTitleOutline = htmlObject("DIV");
oOutline.appendChild(oTitleOutline);
oTitleOutline.className = "oTitleOutline";
var vTable = htmlObject("TABLE");
oTitleOutline.appendChild(vTable);
vTable.width = "100%";
vTable.border = 0;
vTable.cellSpacing = 0;
vTable.cellPadding = 0;
var vTBody = htmlObject("TBODY");
vTable.appendChild(vTBody);
var vTr1 = htmlObject("TR");
vTBody.appendChild(vTr1);
var vTdTopLeft = htmlObject("TD");
vTr1.appendChild(vTdTopLeft);
vTdTopLeft.height = titleHeight;
vTdTopLeft.className = "oTopLeft";
oTitleArea = htmlObject("TD");/////////////////////////////////
vTr1.appendChild(oTitleArea);
oTitleArea.className = "oTitleArea";
var vTdTopRight = htmlObject("TD");
vTr1.appendChild(vTdTopRight);
vTdTopRight.className = "oTopRight";
}
this.setTitleHeight = function(pHeight){
//设置标题区域的高度
}
//________________________________________________
var tabBtn_click = function(){
self.setActiveTab(this.index);
}
var tabBtn_mouseover = function(){
if(this.className =="oTabBtnActive")
return;
this.className = "oTabBtnHover";
}
var tabBtn_mouseout = function(){
if(this.className =="oTabBtnActive")
return;
this.className = "oTabBtn";
}
//________________________________________________
var createTabBtn = function(pLabel,pTabPage){
var vTabBtn = htmlObject("DIV");
oTitleArea.appendChild(vTabBtn);
vTabBtn.className = "oTabBtn";
vTabBtn.index = tabArray.length;
vTabBtn.tabPage = pTabPage;
vTabBtn.onclick = tabBtn_click;
vTabBtn.onmouseover = tabBtn_mouseover;
vTabBtn.onmouseout = tabBtn_mouseout;
tabArray.push(vTabBtn);
var vTabBtnL = htmlObject("DIV");
vTabBtn.appendChild(vTabBtnL);
vTabBtnL.className = "oTabBtnLeft";
vTabBtnC = htmlObject("DIV");
vTabBtn.appendChild(vTabBtnC);
vTabBtnC.className = "oTabBtnCenter";
vTabBtnC.innerHTML = pLabel;
vTabBtnR = htmlObject("DIV");
vTabBtn.appendChild(vTabBtnR);
vTabBtnR.className = "oTabBtnRight";
}
var createPageOutline = function(){
oPageOutline = htmlObject("DIV");
oOutline.appendChild(oPageOutline);
oPageOutline.className = "oPageOutline";
var vTable = htmlObject("TABLE");
oPageOutline.appendChild(vTable);
vTable.width = "100%";
vTable.border = 0;
vTable.cellSpacing = 0;
vTable.cellPadding = 0;
vTable.style.borderCollapse = "collapse";
vTable.style.tableLayout="fixed";
var vTBody = htmlObject("TBODY");
vTable.appendChild(vTBody);
var vTr1 = htmlObject("TR");
vTBody.appendChild(vTr1);
var vTdBottomLeft = htmlObject("TD");
vTr1.appendChild(vTdBottomLeft);
vTdBottomLeft.className = "oBottomLeft";
vTdBottomLeft.rowSpan = 2;
oPageArea = htmlObject("TD");///////////////////////////////////////
vTr1.appendChild(oPageArea);
oPageArea.className = "oPageArea";
if(oPageArea.filters)
oPageArea.style.cssText = "FILTER: progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0, motion='forward');";
oPageArea.height = 10;
var vTdBottomRight = htmlObject("TD");
vTr1.appendChild(vTdBottomRight);
vTdBottomRight.className = "oBottomRight";
vTdBottomRight.rowSpan = 2;
var vTr2 = htmlObject("TR");
vTBody.appendChild(vTr2);
var vTdBottomCenter = htmlObject("TD");
vTr2.appendChild(vTdBottomCenter);
vTdBottomCenter.className = "oBottomCenter";
}
//________________________________________________
this.addTab = function (pLabel,pPageBodyId){
createTabBtn(pLabel,pPageBodyId);
if($(pPageBodyId)){
oPageArea.appendChild($(pPageBodyId));
$(pPageBodyId).style.display = "none";
}
}
//________________________________________________
this.setActiveTab = function(pIndex){
if(oPageArea.filters)
oPageArea.filters[0].apply();
if(activedTab != null){
activedTab.className = "oTabBtn";
if($(activedTab.tabPage))
$(activedTab.tabPage).style.display = "none";
}
activedTab = tabArray[pIndex];
activedTab.className = "oTabBtnActive";
if($(activedTab.tabPage))
$(activedTab.tabPage).style.display = "";
if(oPageArea.filters)
oPageArea.filters[0].play(duration=1);
};
//________________________________________________
this.create = function(){
createOutline();
createTitleOutline();
createPageOutline();
}
}
var menuTab = new JMenuTab(null,null,"menuBar");
menuTab.create();
menuTab.addTab("首页");
menuTab.addTab("组织架构","page1");
menuTab.addTab("员工信息","page2");
menuTab.addTab("业务知识","page3");
menuTab.addTab("ISO系统");
menuTab.addTab("办公环境");
menuTab.addTab("公司新闻");
menuTab.addTab("公共政策");
menuTab.addTab("链接总部");
menuTab.addTab("Help","pageHelp");
menuTab.setActiveTab(2);
</script>
请下载源码察看效果。
标签:
一个js实现的所谓的滑动门
无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新日志
2024年11月16日
2024年11月16日
- MF唱片-《宝马[在真HD路上]》2CD[低速原抓WAV+CUE]
- 李娜《相信我》新时代[WAV+CUE]
- 2019明达发烧碟MasterSuperiorAudiophile[WAV+CUE]
- 蔡幸娟.1993-相爱容易相处难【飞碟】【WAV+CUE】
- 陆虎.2024-是否愿意成为我的全世界【Hikoon】【FLAC分轨】
- 关淑怡.2009-ERA【星娱乐】【WAV+CUE】
- 林忆莲《关于她的爱情故事》2022新世纪MQA 24K金碟限量版[WAV+CUE]
- 张雨生1993《一天到晚游泳的鱼》台湾G字首版[WAV+CUE][1G]
- 群星《试音五大女声》[WAV+CUE][1G]
- 魔兽世界wlk武器战一键输出宏是什么 wlk武器战一键输出宏介绍
- 魔兽世界wlk狂暴战一键输出宏是什么 wlk狂暴战一键输出宏介绍
- 魔兽世界wlk恶魔术士一键输出宏是什么 wlk恶魔术士一键输出宏介绍
- 医学爱好者狂喜:UP主把医学史做成了格斗游戏!
- PS5 Pro评分解禁!准备升级入手吗?
- 我们盘点了近期火热的国产单机游戏!《琉隐神渡》等 你期待哪款?