有关日历,请看:
http://go.163.com/colorweb/js/mengxhselectdate.htm
http://go.163.com/colorweb/js/mengxhselectdate.htm
解决方案 »
- 问下磨铁的章节自动加载是怎么实现的?
- 关于导航栏的细节问题 急急!!!!!!
- [百度分享]初探 jQuery 的 Sizzle 选择器(三)
- 大侠们救急啊。
- 鼠标事件,简单问题,谢谢!
- 这个问题困扰我好久了,请诸位大神给解答一下吧~
- 在javascript中,用什么函数能把数字型转换成字符型,急!!!!
- 急!急!如何将input的type属性从radio改为checkbox
- 很简单的问题。进来留言都有分。
- 如何更改alert弹出窗口的标题的内容
- 在线求助:请问如何读文件
- net_lover(孟子E章) weidegong(weidegong) qiushuiwuhen(秋水无恨) 进来拿分!!谢谢!!
http://www.1stscript.com/javascript/subindex.php?category=date&pagenum=1&type=
如果你能用得上的话,要谢请谢他们!<select id=year onchange=toDay()>
<option value=2000>2000</option>
<option value=2001>2001</option>
<option value=2002>2002</option>
</select>
<select id=month onchange=toDay()>
<option value=0>1</option>
<option value=1>2</option>
<option value=2>3</option>
<option value=3>4</option>
<option value=4>5</option>
<option value=5>6</option>
<option value=6>7</option>
<option value=7>8</option>
<option value=8>9</option>
<option value=9>10</option>
<option value=10>11</option>
<option value=11>12</option>
</select>
<select id=day onchange=toWeekDay()></select>
<input name=weekday>
<script>
function toDay(){
vYear=parseInt(document.all.year.options[document.all.year.selectedIndex].value)
vMonth=parseInt(document.all.month.options[document.all.month.selectedIndex].value)
day.length=0;
while((d=new Date(vYear,vMonth,day.length+1)).getMonth()==vMonth){day.options[day.length++].value=day.length;day.options[day.length-1].text=day.length;}
toWeekDay();
}function toWeekDay(){
try{
vDay=parseInt(document.all.day.options[document.all.day.selectedIndex].value)
var tmp=new Date(vYear+"/"+(vMonth+1)+"/"+vDay);
document.all("weekday").value=showweek(tmp);
}catch(e){alert(e)}}function showweek(now) {if (now.getDay() == 0) return ("星期日")if (now.getDay() == 1) return ("星期一")if (now.getDay() == 2) return ("星期二")if (now.getDay() == 3) return ("星期三")if (now.getDay() == 4) return ("星期四")if (now.getDay() == 5) return ("星期五")if (now.getDay() == 6) return ("星期六")}
window.onload=toDay
</script>
n.setYear(2002);
n.setMonth(3);
n.setDate(30); //这里记不清了alert(n.getDay());