代码非原创..博客是原创.........
先上图
测试页面
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript" src="js/popcalendar.js"></script>
<link href="css/cssCn.css" type="text/css" rel="stylesheet" />
</head>
<body>
<input type="text" id="birthday" />
<img src="images/calendar.gif" width="16" height="15" border="0" onClick="popUpCalendar(birthday,birthday, 'yyyy-mm-dd');" style="cursor:hand">
</body>
</html>
popUpCalendar(birthday,birthday, 'yyyy-mm-dd');"这个方法的前两个参数貌似必须相同.
完整例子在附件里.我就不贴代码了