js實(shí)現(xiàn)仿Windows風(fēng)格選項(xiàng)卡和按鈕效果實(shí)例
本文實(shí)例講述了js實(shí)現(xiàn)仿Windows風(fēng)格選項(xiàng)卡和按鈕效果的方法。分享給大家供大家參考。具體實(shí)現(xiàn)方法如下:
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<style type="text/css">
<!--
body{
font-family: 'MS Shell Dlg', 宋體, Tahoma;
font-size: 12px;
background-color: #336699;
color:#000000;
}
td, div, input, textarea{
font-family: 'MS Shell Dlg', 宋體, Tahoma;
font-size: 12px;
cursor: default;
}
.title{
background-color: #000080;
color:#fdf7d3;
padding: 1;
font-family:宋體;
font-size:12px;
}
.up{
background-color: #cccccc;
color:#000000;
border: 2px outset #ffffff
}
.down{
background-color: #cccccc;
border:2px inset #ffffff
}
.up1{
background-color: #cccccc;
color: #000000;
border: 1px outset #ffffff
}
.down1{
background-color:#cccccc;
border:1px inset #ffffff
}
.l {
background-color: #cccccc;
height: 18px;
border-left: 2px outset #ffffff;
border-right: 2px outset #ffffff;
color:#000000;
border-top: 2px outset #ffffff;
padding-top: 2;
height:18
}
.lc {
background-color: #cccccc;
height: 18px;
border-left: 2px outset #ffffff;
border-right: 2px outset #ffffff;
color:#000000;
border-top: 2px outset #ffffff;
padding-top: 2;
height:20
}
.l-h{
background-color: #cccccc;
border-left: 2px outset #ffffff ;
border-top: 2px outset #ffffff;
color:#000000;
}
.l-c{
background-color: #cccccc;
border-top: 2px outset #ffffff
}
.l-r {
background-color: #cccccc;
border-right: 2px outset #ffffff;
border-top: 2px outset #ffffff;
color:#000000;
}
.l-hc{
background-color: #cccccc;
border-left: 2px outset #ffffff;
color:#000000;
}
.l-cc{
background-color: #cccccc;
color:#000000;
}
.l-rc {
background-color: #cccccc;
border-right: 2px outset #ffffff;
color:#000000;
}
td{
color:#000000;
}
-->
</style>
<title>顯示屬性</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body style="border:outset 1 #ffffff;margin: 0;background-color: #cccccc;padding:3px" scroll=no>
<SCRIPT LANGUAGE="JavaScript">
<!--
function restore()
{
td1.className="l";
td2.className="l";
td3.className="l";
td4.className="l";
td5.className="l";
td6.className="l";
td_1.className="l-h";
td_2.className="l-c";
td_3.className="l-c";
td_4.className="l-c";
td_5.className="l-c";
td_6.className="l-c";
w1.style.display="none";
w2.style.display="none";
w3.style.display="none";
w4.style.display="none";
w5.style.display="none";
w6.style.display="none";
}
function c1()
{
td1.className="lc";
td_1.className="l-hc";
w1.style.display="block";
}
function c2()
{
td2.className="lc";
td_2.className="l-cc";
w2.style.display="block";
}
function c3()
{
td3.className="lc";
td_3.className="l-cc";
w3.style.display="block";
}
function c4()
{
td4.className="lc";
td_4.className="l-cc";
w4.style.display="block";
}
function c5()
{
td5.className="lc";
td_5.className="l-cc";
w5.style.display="block";
}
function c6()
{
td6.className="lc";
td_6.className="l-cc";
w6.style.display="block";
}
//-->
</SCRIPT>
<form name="free" method="post" target="_target">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="400" height="61">
<tr>
<td width="50" height="20" align="center"
valign="bottom" onclick=restore();c1();>
<div id="td1" class="lc">背景</div></td>
<td width="50" height="20" align="center"
valign="bottom" onclick=restore();c2();>
<div id="td2" class="l">屏保</div></td>
<td width="50" height="20" align="center"
valign="bottom" onclick=restore();c3();>
<div id="td3" class="l">外觀</div></td>
<td width="50" height="20" align="center"
valign="bottom" onclick=restore();c4();>
<div id="td4" class="l">Web</div></td>
<td width="50" height="20" align="center"
valign="bottom" onclick=restore();c5();>
<div id="td5" class="l">效果</div></td>
<td width="50" height="20" align="center"
valign="bottom" onclick=restore();c6();>
<div id="td6" class="l">設(shè)置</div></td>
<td width="50" height="20" align="center" valign="bottom" ></td>
<td width="50" height="20" align="center" valign="bottom"></td>
</tr>
<tr style="">
<td width="50" height="1" align="center" class="l-hc" id="td_1" > </td>
<td width="50" height="1" align="center" class="l-c" id="td_2"> </td>
<td width="50" height="1" align="center" class="l-c" id="td_3"> </td>
<td width="50" height="1" align="center" class="l-c" id="td_4"> </td>
<td width="50" height="1" align="center" class="l-c" id="td_5"> </td>
<td width="50" height="1" align="center" class="l-c" id="td_6"> </td>
<td width="50" height="1" align="center" class="l-c" id="td_"> </td>
<td width="50" height="1" align="center" class="l-r" id="td_"> </td>
</tr>
<tr>
<td width="398" height="360" class="up" colspan="8"
style="border-top-style: solid; border-top-width: 0; padding: 5">
<p align="center">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0"
width="100%" height="325">
<tr>
<td width="100%" height="280">
<div align="center">
<center>
<div style="display:" id=w1><h1>1</h1></div>
<div style="display:none" id=w2><h1>2</h1></div>
<div style="display:none" id=w3><h1>3</h1></div>
<div style="display:none" id=w4><h1>4</h1></div>
<div style="display:none" id=w5><h1>5</h1></div>
<div style="display:none" id=w6><h1>6</h1></div>
</center>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</center>
<tr>
<td width="398" height="37" colspan="8"
style="border-top-style: solid; border-top-width: 0; padding: 5">
<p align="right"><input type="button" value="確定" name="_ok"
style="width: 60;height:22" class="up">
<input type="button" value="取消" name="_cancel"
style="width: 60;height:22" class="up" onclick="window.close();">
<input type="button" value="應(yīng)用(A)" name="_apply"
style="width: 60;height:22" disabled class="up">
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
運(yùn)行效果如下:

希望本文所述對(duì)大家的javascript程序設(shè)計(jì)有所幫助。
- js實(shí)現(xiàn)的早期滑動(dòng)門菜單效果代碼
- JS+CSS實(shí)現(xiàn)滑動(dòng)切換tab菜單效果
- js實(shí)現(xiàn)的簡(jiǎn)潔網(wǎng)頁(yè)滑動(dòng)tab菜單效果代碼
- js實(shí)現(xiàn)鼠標(biāo)感應(yīng)向下滑動(dòng)隱藏菜單的方法
- JS自定義選項(xiàng)卡函數(shù)及用法實(shí)例分析
- js實(shí)現(xiàn)黑色簡(jiǎn)易的滑動(dòng)門網(wǎng)頁(yè)tab選項(xiàng)卡效果
- js實(shí)現(xiàn)仿百度風(fēng)云榜可重復(fù)多次調(diào)用的TAB切換選項(xiàng)卡效果
- js實(shí)現(xiàn)類似菜單風(fēng)格的TAB選項(xiàng)卡效果代碼
- jquery插件tytabs.jquery.min.js實(shí)現(xiàn)漸變TAB選項(xiàng)卡效果
- js實(shí)現(xiàn)簡(jiǎn)潔的滑動(dòng)門菜單(選項(xiàng)卡)效果代碼
相關(guān)文章
詳解使用Next.js構(gòu)建服務(wù)端渲染應(yīng)用
這篇文章主要介紹了詳解使用Next.js構(gòu)建服務(wù)端渲染應(yīng)用,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2018-07-07
JavaScript Event學(xué)習(xí)第四章 傳統(tǒng)的事件注冊(cè)模型
在這一章我會(huì)講解給元素注冊(cè)事件的最好的一種辦法,那就是:確保一個(gè)特定的事件在特定的HTML元素上發(fā)生并且能運(yùn)行特定的腳本。2010-02-02
使用Three.js制作一個(gè)3D獎(jiǎng)牌頁(yè)面
本文將使用React+Three.js技術(shù)棧,制作一個(gè)專屬的3D獎(jiǎng)牌頁(yè)面,文中的示例代碼講解詳細(xì),感興趣的小伙伴可以跟隨小編一起動(dòng)手試一試2022-01-01
layui中l(wèi)ayer前端組件實(shí)現(xiàn)圖片顯示功能的方法分析
這篇文章主要介紹了layui中l(wèi)ayer前端組件實(shí)現(xiàn)圖片顯示功能的方法,結(jié)合實(shí)例形式分析了layui中l(wèi)ayer組件調(diào)用圖片顯示功能的操作方法與相關(guān)注意事項(xiàng),并提供了layer與layui源碼下載,需要的朋友可以參考下2017-10-10
JavaScript中數(shù)據(jù)過(guò)濾的幾種常見方法
JavaScript是一種廣泛使用的編程語(yǔ)言,它提供了多種方法來(lái)對(duì)數(shù)據(jù)進(jìn)行過(guò)濾,在本文中,我們將介紹JavaScript中常見的幾種數(shù)據(jù)過(guò)濾方法,并提供相應(yīng)的示例,感興趣的朋友跟隨小編一起看看吧2023-10-10
用javascript實(shí)現(xiàn)自定義標(biāo)簽
用javascript實(shí)現(xiàn)自定義標(biāo)簽...2007-05-05
JavaScript自定義Promise實(shí)現(xiàn)流程
現(xiàn)在網(wǎng)上有非常多的Promise文章,但都是給你一堆代碼,或者某些核心代碼,讓你看完之后感覺,嗯,很厲害,但還是不知所云,不知其所以然。那么本文真正從一個(gè)小白開始帶你深入淺出,一步一步實(shí)現(xiàn)自己的?Promise,這種自己造輪子的過(guò)程一定是進(jìn)步最快的過(guò)程,快上車開始吧2022-10-10

