新手求助php日历问题
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<style>
.tdborder{
border: 1px solid red;
}
</style>
<script type="text/javascript">
function test(){
var tb = document.getElementsByTagName("table")[0];
var trs = tb.getElementsByTagName("tr");
for(var i=0;i<trs.length;i++){
var td = trs[i].firstChild;
var tdl = trs[i].lastChild;
td.setAttribute("style","color:red");
tdl.setAttribute("style","color:red");
}
var tds = tb.getElementsByTagName("td");
for(var j=0;j<tds.length;j++){
tds[j].onmouseover = function(){
for(var k=0;k<tds.length;k++){
tds[k].className="";
}
this.className="tdborder";
}
tds[j].onclick = function(e){
var div = document.getElementsByTagName("div");
&n