javascript+css 实现tab功能
<!---------<html>
<head>
<style type="text/css">
.tabheader table {
border-collapse: collapse; /* for IE */
border-spacing: 0; /* for N6 */
}
.tabheader table tr td {margin:0;padding:0;border-width:0}
.tabheader .close {
border-style: solid;
border-width: 1px;
border-color: #000;
background-color: #d0d0d0;
margin:0;
padding: 0.5em;
white-space: nowrap;
}
.tabheader .open {
border-style: solid;
border-width: 1px;
border-color: #000 #000 #fff #000;
background-color: white;
margin:0;
padding: 0.5em;
white-space: nowrap;
}
.tabheader .spc {
border-style: solid;
border-width: 1px 0 1px 0;
border-color: #fff #fff #000 #fff;
margin:0;
padding: 0.5em;
white-space: nowrap;
}
.tabheader a {text-decoration: none;}
.tabbody {
border-color: black;
border-style: solid;
border-width: 0 1px 1px 1px;
padding: 1em;
}
</style>
<script language="JavaScript">
<!--
function seltab(bpref, hpref, id_max, selected) {
if (! document.getElementById) return;
for (i = 0; i <= id_max; i++) {
if (! document.getElementById(bpref + i)) continue;
if (i == selected) {
document.getElementById(bpref + i).style.visibility = "visible";
document.getElementById(bpref + i).style.position = "";
document.getElementById(hpref + i).className = "open";
} else {
&n
相关文档:
css圆角box(百度知道挖出) 1.css .zhidao_box {
position: relative;
width: 100%;
}
.zhidao_box .rg_1, .zhidao_box .rg_2, .zhidao_box .rg_3 {
height: 1px;
font-size: 0px;
ov ......
<style type="text/css">
/*
从上往下渐变
*/
body
{
FILTER:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#003C9F,endColorStr=white);
}
/*
从左上至右下渐变
*/
body
{
background-color:skyblue;
FILTE ......
在javascript中用法举例
var rule = /^\d+$/;
if(!rule.test(addform.rmb_price.value)) {
alert('rmb_price must be number');
addform.rmb_price.focus();
return false;
}
在php中用法举例
$aa = "/^\d+$/";
if(preg_match($aa, "111")) {
echo "found";
}
在java中用法举例 ......