惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Cybersecurity and Infrastructure Security Agency CISA
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
量子位
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
小众软件
小众软件
T
Tailwind CSS Blog
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
V
Visual Studio Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Exploit Database - CXSecurity.com
T
Tenable Blog
博客园 - 叶小钗
宝玉的分享
宝玉的分享
P
Privacy International News Feed
T
Tor Project blog
博客园_首页
AWS News Blog
AWS News Blog
雷峰网
雷峰网
C
Cisco Blogs
Help Net Security
Help Net Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - 【当耐特】
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI
K
Kaspersky official blog
人人都是产品经理
人人都是产品经理
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Schneier on Security
博客园 - Franky
W
WeLiveSecurity
L
LINUX DO - 热门话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Proofpoint News Feed
大猫的无限游戏
大猫的无限游戏
腾讯CDC
L
Lohrmann on Cybersecurity
J
Java Code Geeks
美团技术团队
博客园 - 司徒正美
The Cloudflare Blog
V
V2EX

博客园 - 龍峸.大卫

C#格式化字符串,日期,时间,货币 行动吧站长们,为地震遇难同志哀悼! 穷与富 ASP.NET备忘 - 龍峸.大卫 - 博客园 珊瑚虫IP数据库转 SQL 2005 纯真IP转sql 一个非常实用的javascript读写Cookie函数 - 龍峸.大卫 - 博客园 JavaScript操作Cookie详解 采用密码加密的javascript字符串加密、解密程序 - 龍峸.大卫 - 博客园 Microsoft Web Application Stress Tool 网站压力测试工具集 网站维护必知:网站压力测试 Jquery的N个插件 CSS的解决IE5/IE5.5/IE6/FF/IE7的兼容性问题(css hack) 鼠标悬停显示图片 客齐集图片鼠标悬停效果 始终固定在左上角的图片 下拉选单图片选择器 一个简洁的网页日历 经典列表效果
带链接的日历
龍峸.大卫 · 2008-02-14 · via 博客园 - 龍峸.大卫

<Script LANGUAGE="JavaScript">
var months 
= new Array("""""","""""""""""","""十一""十二");
var daysInMonth 
= new Array(3128313031303131,30313031);
var days 
= new Array("","""""","""""");
var classTemp;
var today
=new getToday();
var year
=today.year;
var m.month;
var newCal;
function getDays(month, year) 
{
if (1 == month) return ((0 == year % 4&& (0 != (year % 100))) ||(0 == year % 400? 29 : 28;
else return daysInMonth[month];
}

function getToday() 
{
this.now = new Date();
this.year = this.now.getFullYear();
this.month = this.now.getMonth();
this.day = this.now.getDate();
}

function Calendar() 
{
newCal 
= new Date(year,month,1);
today 
= new getToday();
var day 
= -1;
var startDay 
= newCal.getDay();
var endDay
=getDays(newCal.getMonth(), newCal.getFullYear());
var daily 
= 0;
if ((today.year == newCal.getFullYear()) &&(today.month == newCal.getMonth()))
{
day 
= today.day;
}

var caltable 
= document.all.caltable.tBodies.calendar;
var intDaysInMonth 
=getDays(newCal.getMonth(), newCal.getFullYear());
for (var intWeek = 0; intWeek < caltable.rows.length;intWeek++)
for (var intDay = 0;intDay < caltable.rows[intWeek].cells.length;intDay++)
{
var cell 
= caltable.rows[intWeek].cells[intDay];
var montemp
=(newCal.getMonth()+1)<10?("0"+(newCal.getMonth()+1)):(newCal.getMonth()+1);
if ((intDay == startDay) && (0 == daily)){ daily = 1;}
var daytemp
=daily<10?("0"+daily):(daily);
var d
="<"+newCal.getFullYear()+"-"+montemp+"-"+daytemp+">";
if(day==daily) cell.className="DayNow";
else if(intDay==6) cell.className = "DaySat";
else if (intDay==0) cell.className ="DaySun";
else cell.className="Day";
if ((daily > 0&& (daily <= intDaysInMonth))
{
cell.innerText 
= daily;
daily
++;
}
 else
{
cell.className
="CalendarTD";
cell.innerText 
= "";
}

}

document.all.year.value
=year;
document.all.month.value
=month+1;
}

function subMonth()
{
if ((month-1)<0)
{
m;
year
=year-1;
}
 else
{
m
-1;
}

Calendar();
}

function addMonth()
{
if((month+1)>11)
{
m;
year
=year+1;
}
 else
{
m
+1;
}

Calendar();
}

function setDate()
{
if (document.all.month.value<1||document.all.month.value>12)
{
alert(
"月的有效范围在1-12之间!");
return;
}

year
=Math.ceil(document.all.year.value);
m.ceil(document.all.month.value
-1);
Calendar();
}

</Script>
<Script>
function buttonOver()
{
var obj 
= window.event.srcElement;
obj.runtimeStyle.cssText 
= "background-color:#FFFFFF";
// obj.className="Hover";
}

function buttonOut()
{
var obj 
= window.event.srcElement;
window.setTimeout(function()
{obj.runtimeStyle.cssText = "";},300);
}

</Script>
<Style>
Input 
{font-family: verdana;font-size: 9pt;text-decoration: none;background-color: #FFFFFF;height: 20px;border: 1px solid #666666;color:#000000;}
.Calendar 
{font-family: verdana;text-decoration: none;width: 170;background-color: #C0D0E8;font-size: 9pt;border:0px dotted #1C6FA5;}
.CalendarTD 
{font-family: verdana;font-size: 7pt;color: #000000;background-color:#f6f6f6;height: 20px;width:11%;text-align: center;}
.Title 
{font-family: verdana;font-size: 11pt;font-weight: normal;height: 24px;text-align: center;color: #333333;text-decoration: none;background-color: #A4B9D7;border-top-width: 1px;border-right-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-bottom-style:1px;border-top-color: #999999;border-right-color: #999999;border-bottom-color: #999999;border-left-color: #999999;}
.Day 
{font-family: verdana;font-size: 7pt;color:#243F65;background-color: #E5E9F2;height: 20px;width:11%;text-align: center;}
.DaySat 
{font-family: verdana;font-size: 7pt;color:#FF0000;text-decoration: none;background-color:#E5E9F2;text-align: center;height: 18px;width: 12%;}
.DaySun 
{font-family: verdana;font-size: 7pt;color: #FF0000;text-decoration: none;background-color:#E5E9F2;text-align: center;height: 18px;width: 12%;}
.DayNow 
{font-family: verdana;font-size: 7pt;font-weight: bold;color: #000000;background-color: #FFFFFF;height: 20px;text-align: center;}
.DayTitle 
{font-family: verdana;font-size: 9pt;color: #000000;background-color: #C0D0E8;height: 20px;width:11%;text-align: center;}
.DaySatTitle 
{font-family: verdana;font-size: 9pt;color:#FF0000;text-decoration: none;background-color:#C0D0E8;text-align: center;height: 20px;width: 12%;}
.DaySunTitle 
{font-family: verdana;font-size: 9pt;color: #FF0000;text-decoration: none;background-color: #C0D0E8;text-align: center;height: 20px;width: 12%;}
.DayButton 
{font-family: Webdings;font-size: 9pt;font-weight: bold;color: #243F65;cursor:hand;text-decoration: none;}
</Style>
<table border="0" cellpadding="0" cellspacing="1" class="Calendar" id="caltable">
<thead>
<tr align="center" valign="middle">
<td colspan="7" class="Title">
<a href="javaScript:subMonth();" title="上一月" Class="DayButton">3</a> <input name="year" type="text" size="4" maxlength="4"    > 年 <input name="month" type="text" size="1" maxlength="2"    > 月 <a href="JavaScript:addMonth();" title="下一月" Class="DayButton">4</a>
</td>
</tr>
<tr align="center" valign="middle">
<Script LANGUAGE="JavaScript">
document.write(
"<TD class=DaySunTitle id=diary >" + days[0+ "</TD>");
for (var intLoop = 1; intLoop < days.length-1;intLoop++)
document.write(
"<TD class=DayTitle id=diary>" + days[intLoop] + "</TD>");
document.write(
"<TD class=DaySatTitle id=diary>" + days[intLoop] + "</TD>");
</Script>
</TR>
</thead>
<TBODY border=1 cellspacing="0" cellpadding="0" ID="calendar" ALIGN=CENTER >
<Script LANGUAGE="JavaScript">
for (var intWeeks = 0; intWeeks < 6; intWeeks++)
{
document.write(
"<TR style='cursor:hand'>");
for (var intDays = 0; intDays < days.length;intDays++) document.write("<TD class=CalendarTD onMouseover='buttonOver();' :document.location.href='aaa.htm'; onMouseOut='buttonOut();'></TD>");
document.write(
"</TR>");
}

</Script>
</TBODY>
</TABLE>
<Script  LANGUAGE="JavaScript">
Calendar();
</Script>