WEB设计 日期时间选择器
'function ShowSelect(str,str2){HideSelect=0;HSelect();Scroll(\'\',str2);document.getElementByI d(str).style.display="block";CurrentSelect=str2}'+ 'function HSelect(){document.getElementById("SelectYear").style.display="none";document.g etElementById("SelectMonth").style.display="none";}'+ 'function Calendar_GetDate(y,m,d)'+ '{var objEvent=window.event||arguments.callee.caller.arguments[0];'+ 'var srcElement=objEvent.srcElement;'+ 'if(!srcElement){srcElement=objEvent.target;}'+ 'if(srcElement.tagName=="A"){parent.Calendar_GetDate(y,m,srcElement.innerHTML); }}'+ 'document.onclick=function(){if(HideSelect){HSelect();}HideSelect=1;}</scr'+ 'ipt><body onkeydown="KeyDown(event.keyCode);">'+ '<div id="SelectYear" style="left:31px;" onclick="ShowSelect(\'SelectYear\',\'Y\');"><div id="Select"><a href="javascript:;" onmousedown="mdown=window.setInterval(\'Scroll(\\\'Up\\\',\\\'Y\\\')\',50);" onmouseup="window.clearInterval(mdown);" onmouseout="window.clearInterval(mdown);" id="SelectBn" style="border-bottom:1px solid #5563B0;"><font face="Webdings">5</font></a><div id="SelectYearItem">'+ '</div><a href="javascript:;" onmousedown="mdown=window.setInterval(\'Scroll(\\\'Next\\\',\\\'Y\\\')\',50);" onmouseup="window.clearInterval(mdown);" onmouseout="window.clearInterval(mdown);" id="SelectBn" style="border-top:1px solid #5563B0;"><font face="Webdings">6</font></a></div></div>'+ '<div id="SelectMonth" style="left:99px;" onclick="ShowSelect(\'SelectMonth\',\'M\');"><div id="Select"><a href="javascript:;" onmousedown="mdown=window.setInterval(\'Scroll(\\\'Up\\\',\\\'M\\\')\',50);" onmouseup="window.clearInterval(mdown);" onmouseout="window.clearInterval(mdown);" id="SelectBn" style="border-bottom:1px solid #5563B0;"><font face="Webdings">5</font></a><div id="SelectMonthItem">'+ '</div><a href="javascript:;" onmousedown="mdown=window.setInterval(\'Scroll(\\\'Next\\\',\\\'M\\\')\',50);" onmouseup="window.clearInterval(mdown);" onmouseout="window.clearInterval(mdown);" id="SelectBn" style="border-top:1px solid #5563B0;"><font face="Webdings">6</font></a></div></div>';
//%%%%%%%%%%%%%%%時間選擇器%%%%%%%%%%%%% var str = ""; document.writeln("<div id=\"_contents\" style=\"padding:6px; background-color:#E3E3E3; font-size: 12px; border: 1px solid #777777; position:absolute; left:?px; top:?px; width:?px; height:?px; z-index:1; visibility:hidden\">"); str += "\u65f6<select name=\"_hour\">"; for (h = 0; h <= 9; h++) {
str += "<option value=\"0" + h + "\">0" + h + "</option>"; } for (h = 10; h <= 23; h++) {
str += "<option value=\"" + h + "\">" + h + "</option>"; } str += "</select> \u5206<select name=\"_minute\">"; for (m = 0; m <= 9; m++) {
//%%%%%%%%%%%%%%%%日历選擇器%%%%%%%%%%%%%% var MonthDNum=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31); var MonthText=new Array("","一月","二月","三月","四月","五月","六月","七月"," 八月","九月","十月","十一月","十二月"); var Calendar_obj,Calendar_obj2; //var WriteHead=1; document.write('<iframe style="position:absolute;width:206px;display:none;" name="divCalendar" id="divCalendar" frameborder="0" scrolling="no"></iframe>') /*头部信息 CSS 及 JS 函数*/ var HeadMsg='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd">'+ '<html xmlns="/1999/xhtml">'+ '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css"><!--'+ 'body,html{margin:0px;height:100%;background:#FFF;}a,li,input {font-family:"Verdana","Arial";font-size:12px;}'+ 'a {height:18px;color:#000;padding-top:2px;text-decoration:none;display:block;}'+ 'a:hover{height:17px;padding-top:1px;border:1px solid #000;background:#FFF;}'+ '.CurrentDate {height:17px;padding-top:1px;border:1px solid #000;background: #FFF;}'+ 'ul{list-style:none;margin:0px;padding:0px;overflow:hidden;}'+ 'ul li{float:left;margin-left:1px;padding-top:1px;display:inline;text-align:center;width:28 px;height:20px;}'+