87,910
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv = "Content-type" content = "text/html; charset = gb2312">
<title>date selector</title>
<style type = "text/css" charset = "gb2312">
<!--
.change
{
background-color: red;
}
table
{
width: 183px;
height: 10px;
}
table tr
{
height: 10px;
font-size: 13px;
color: blue;
text-align: center;
}
.arrowSize
{
font-size: 7px;
}
.dateSize
{
font-size: 12px;
}
-->
</style>
</head>
<body>
<table>
<tr class = "arrowSize">
<td><<</td>
<td><</td>
<td class = "dateSize">2011年12月31日</td>
<td>></td>
<td>>></td>
</tr>
</table>
<table>
<tr height = "20">
<td>日</td>
<td>一</td>
<td>二</td>
<td>三</td>
<td>四</td>
<td>五</td>
<td>六</td>
</tr>
<script>
<!--
var print = "";
var count = 0;
var columnArr = new Array();
for (var iRow = 0; iRow < 6; iRow++) {
print += "<tr>";
for (var iCol = 0; iCol < 7; iCol++) {
count++;
if (count < 32) {
print += "<td onmouseover=this.className='change' onmouseout=this.className='' onclick = \"alert( " + count + " );\">"
// 为什么这里的count输出永远是一个数 +count+"</td>";
}
}
print += "</tr>";
}
document.write(print);
var year = 2011;
var month = 12;
var lastDay = new Date(year, month, 0);
lastDay = lastDay.getDate();
var firstDay = new Date(year, month - 1, 1);
firstDay = firstDay.getDay();
-->
</script>
</table>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv = "Content-type" content = "text/html; charset = gb2312">
<title>date selector</title>
<style type = "text/css" charset = "gb2312">
<!--
.change
{
background-color: red;
}
table
{
width: 183px;
height: 10px;
}
table tr
{
height: 10px;
font-size: 13px;
color: blue;
text-align: center;
}
.arrowSize
{
font-size: 7px;
}
.dateSize
{
font-size: 12px;
}
-->
</style>
</head>
<body>
<table>
<tr class = "arrowSize">
<td><<</td>
<td><</td>
<td class = "dateSize">2011年12月31日</td>
<td>></td>
<td>>></td>
</tr>
</table>
<table>
<tr height = "20">
<td>日</td>
<td>一</td>
<td>二</td>
<td>三</td>
<td>四</td>
<td>五</td>
<td>六</td>
</tr>
<script>
<!--
var print = "";
var count = 0;
var columnArr = new Array();
for( var iRow = 0; iRow < 6; iRow++ )
{
print += "<tr>";
for( var iCol = 0; iCol < 7; iCol++ )
{
count++;
if( count < 32 )
{
print += "<td onmouseover=this.className='change' onmouseout=this.className='' onclick = \"alert( "+count+" );\">"
// 为什么这里的count输出永远是一个数 +count+"</td>";
}
}
print += "</tr>";
}
document.write( print );
var year = 2011;
var month = 12;
var lastDay = new Date(year, month, 0);
lastDay = lastDay.getDate();
var firstDay = new Date(year, month-1, 1);
firstDay = firstDay.getDay();
-->
</script>
</table>
</body>
</html>