一个简单横向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>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<style type="text/css">
*{font-size:14px}
/*日期最外层*/
#logCalendar{width:950px;border-top:1px solid #ccc;border-left:1px solid #ccc}
/*日期内部所有单元格*/
#logCalendar td{
border-right:1px solid #ccc;border-bottom:1px solid #ccc;
padding-left:5px;text-align:center;
height:22px;line-height:22px;
}
#daysList{border-top:1px solid #ccc;border-left:1px solid #ccc}
/*日期列表所有单元格*/
#daysList td{text-align:center;height:22px}
/*周次及星期几的输入框*/
.bd{border:0;text-align:center;color:#00f}
/*日期默认样式*/
.unSelectDay{
color:#00f;font-weight:normal;
padding:3px;cursor:pointer;
text-decoration:underline
}
/*当前点击的日期样式*/
.selectDay{color:#fff;font-weight:bold;background:#FEB0B0;padding:1px;text-decoration:none;cursor:normal}
/*周末样式*/
.weekEnd{color:#f00}
.test{color:#f00;text-decoration:none}
</style>
 
相关文档:
javascript修改IMG标签的SRC实现验证码时,IE正常,火狐和google出状况
1.当点击某一按钮的时候,把图片域中的图片改变一下
<img id="randimg" src="/servlet/CreateValidateNum" width="60" height="20" />
<span style="cursor:hand" onclick="reflush();return false; ......
replace()最简单的算是能力就是简单的字符替换。
示例代码如下:
<script language="javascript">
var strM = "javascript is a good script language";
//在此我想将字母a替换成字母A
alert(strM.replace("a","A"));
</script>
它只替换了首字母。但如 ......
scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......
利用Javascript创建弹出式窗口的目的实际上是打开另外的浏览器窗口。你可以设置这个浏览器窗口的一些属性,如高度、宽度以及是否让该窗口有一个状态条或者工具条。在下面的例子中,我将窗口设置为:350
x 400,即高度为350像素,宽度为400像素;其中也包括了另外的一些设置,如滚动条;而将其它的设置(如状态条、菜单条) ......
在第一章中,我们使用构造函数和原型的方式在JavaScript的世界中实现了类和继承, 但是存在很多问题。这一章我们将会逐一分析这些问题,并给出解决方案。
注:本章中的jClass的实现参考了Simple JavaScript Inheritance
的做法。
首先让我们来回顾一下第一章中介绍的例子:
function Person(name) {
this.name = nam ......