|
|
 |
 |
|
|
 |
|
最精致的日历式日期输入控件
|
|
|
|
编辑:华夏媒体 作者:未知 来源:网络 时间:2006-07-29 总浏览量:2419 |
|
文字大小:[ 大 中 小 ]
文字颜色: 双击滚屏/单击停止 |
|
[上一页] [1] [2] [3] [4] [5] [6] [7] [下一页]
|
d++; } FrameContent+="</tr>"+"\n"; } FrameContent+="</table>"+"\n"; FrameContent+="<table onselectstart=\"return false;\" cellpadding='0' cellspacing='0' bgcolor='#F5F5F5' width='100%' height='15'>"+"\n<tr>\n"; FrameContent+="<td title=\"今日:"+GetTodayDate()+"\" style=\"cursor:hand\" onclick=\"parent.SetTodayDate(window.parent.document.all."+InputBox.name+")\">"; FrameContent+="<font color=red>今日:</font>"+GetTodayDate(); FrameContent+="</td>\n"; FrameContent+="<td>"; FrameContent+="<img src='http://edu.chinaz.com/Get/Website/Javascript/inc/close.gif' width='13' height='13' border='0' alt='关闭' style='cursor:hand' onclick=\"parent.HiddenCalendar()\">"; FrameContent+="</td>\n"; FrameContent+="</tr>\n"; document.all.Calendar.innerHTML=FrameContent; document.all.Calendar.style.display=""; } /*显示输入框*/ function DateBox(sBoxName, sDfltValue) { if (sBoxName==null) sBoxName='Date_Box' if ((sDfltValue==null)||!(DateIsTrue(sDfltValue))) sDfltValue= GetTodayDate() else { DateStr = sDfltValue.split("-"); Y= parseFloat(DateStr[0]); M= (parseFloat(DateStr[1])<10)?('0'+parseFloat(DateStr[1])):parseFloat(DateStr[1]); D= (parseFloat(DateStr[2])<10)?('0'+parseFloat(DateStr[2])):parseFloat(DateStr[2]); sDfltValue=Y+'-'+M+'-'+D } document.write("<input size='10' readonly class='inputdate' name='"+sBoxName+"' value='"+sDfltValue+"' onclick='GetCalendar(window.document.all."+sBoxName+")' >"); } document.onclick = CloseCalendar; //--> </SCRIPT> <BODY topmargin="0" leftmargin="0"> 点击输入框调用日历.<Script>DateBox("Test1")</Script> <Script>DateBox("Test2","2004-01-01")</Script> 其它事件调用日历. <input type="text" class="inputdate" size="10" name="Test3" readonly> <input type="button" class="inputdate" onclick="OpenDate(Test3)" value="显示日历"> </BODY> </HTML>
|
|
[上一页] [1] [2] [3] [4] [5] [6] [7] [下一页]
|
|
|
打印 收藏 关闭 至顶部 |
|
 |
|