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
相关文档:
scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......
调用JavaScript文件
用作导航栏
<!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" /> ......
SEO即搜索引擎优化,从目前互联网的发展状况来看,实现SEO有助于企业减少网络推广的成本。SEO的手段有很多种,或者固定的技术模式,或者非固定的所谓艺术模式也。DIV+CSS是当前公认的网页设计标准,是广为推崇的网页设计新范式,虽然TABLE还被广泛应用,但DIV+CSS优秀的界面控制能力,还是拥有了非常强的竞争优势。当然,目 ......
头:header
内容:content/container
尾:footer
导航:nav
侧栏:sidebar
栏目:column
页面外围控制整体布局宽度:wrapper
左右中:left right center
登录条:loginbar
标志:logo
广告:banner
页面主体:main
热点:hot
新闻:news
下载:down ......
原文:JavaScript - The this keyword
在 JavaScript 中 this 是最强的关键字之一。这篇贴文就是要告诉你如何用好 this。
下面先讲如何在event handling
(事件处理)中用它,再接着是讲 this 的其他用法。
所有者(Owner)
先来看看函数 doSomething() 里的 this 究竟指向(refer to)了什么?
function doSomething() { ......