新手求助php日历问题
<script><br /><br /> function test(){<br /> var tb = document.getElementsByTagName("table")[0];<br /> var trs = tb.getElementsByTagName("tr");<br /><br /><br /><br /> for(var i=0;i<trs.length;i++){<br /> var td = trs[i].firstChild;<br /> var tdl = trs[i].lastChild;<br /><br /> td.setAttribute("style","color:red");<br /> tdl.setAttribute("style","color:red");<br /><br /><br /> }<br /><br /> var tds = tb.getElementsByTagName("td");<br /> for(var j=0;j<tds.length;j++){<br /><br /> tds[j].onmouseover = function(){<br /> for(var k=0;k<tds.length;k++){<br /> tds[k].className="";<br /> }<br /> this.className="tdborder";<br /> }<br /><br /> tds[j].onclick = function(e){<br /> var div = document.getElementsByTagName("div");<br /> for(var a=0;a<div.length;a++){<br /> document.body.removeChild(div[a]);<br /> }<br />// var w = this.cellIndex;<br />// alert(w);<br /> var e = e || window.event;<br /> var day = this.innerHTML;<br /> var d = document.createElement("div");<br /> d.style.border = "1px solid red";<br /> d.style.position = "absolute";<br /> d.style.zIndex = 22;<br /> d.style.left = e.clientX+20 + "px";<div class="clear">
</script>