日期下拉问题

html-css022

日期下拉问题,第1张

<script language="javascript">

function atCalendarControl(){

var calendar=this

this.calendarPad=null

this.prevMonth=null

this.nextMonth=null

this.prevYear=null

this.nextYear=null

this.goToday=null

this.calendarClose=null

this.calendarAbout=null

this.head=null

this.body=null

this.today=[]

this.currentDate=[]

this.sltDate

this.target

this.source

/************** 加入日历底板及阴影 *********************/

this.addCalendarPad=function(){

document.write("<div id='divCalendarpad' style='position:absolutetop:100left:0width:255height:187display:none'>")

document.write("<iframe frameborder=0 height=189 width=250></iframe>")

document.write("<div style='position:absolutetop:2left:2width:250height:187background-color:#336699'></div>")

document.write("</div>")

calendar.calendarPad=document.all.divCalendarpad

}

/************** 加入日历面板 *********************/

this.addCalendarBoard=function(){

var BOARD=this

var divBoard=document.createElement("div")

calendar.calendarPad.insertAdjacentElement("beforeEnd",divBoard)

divBoard.style.cssText="position:absolutetop:0left:0width:250height:187border:0 outsetbackground-color:buttonface"

var tbBoard=document.createElement("table")

divBoard.insertAdjacentElement("beforeEnd",tbBoard)

tbBoard.style.cssText="position:absolutetop:2left:2width:248height:10font-size:9pt"

tbBoard.cellPadding=0

tbBoard.cellSpacing=1

/************** 设置各功能按钮的功能 *********************/

/*********** Calendar About Button ***************/

trRow = tbBoard.insertRow(0)

calendar.calendarAbout=calendar.insertTbCell(trRow,0,"-","center")

calendar.calendarAbout.title="帮助 快捷键:H"

calendar.calendarAbout.onclick=function(){calendar.about()}

/*********** Calendar Head ***************/

tbCell=trRow.insertCell(1)

tbCell.colSpan=5

tbCell.bgColor="#99CCFF"

tbCell.align="center"

tbCell.style.cssText = "cursor:default"

calendar.head=tbCell

/*********** Calendar Close Button ***************/

tbCell=trRow.insertCell(2)

calendar.calendarClose = calendar.insertTbCell(trRow,2,"x","center")

calendar.calendarClose.title="关闭 快捷键:ESC或X"

calendar.calendarClose.onclick=function(){calendar.hide()}

/*********** Calendar PrevYear Button ***************/

trRow = tbBoard.insertRow(1)

calendar.prevYear = calendar.insertTbCell(trRow,0,"<<","center")

calendar.prevYear.title="上一年 快捷键:↑"

calendar.prevYear.onmousedown=function(){

calendar.currentDate[0]--

calendar.show(calendar.target,calendar.returnTime,calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(calendar.currentDate[2]),calendar.source)

}

/*********** Calendar PrevMonth Button ***************/

calendar.prevMonth = calendar.insertTbCell(trRow,1,"<","center")

calendar.prevMonth.title="上一月 快捷键:←"

calendar.prevMonth.onmousedown=function(){

calendar.currentDate[1]--

if(calendar.currentDate[1]==0){

calendar.currentDate[1]=12

calendar.currentDate[0]--

}

calendar.show(calendar.target,calendar.returnTime,calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(calendar.currentDate[2]),calendar.source)

}

/*********** Calendar Today Button ***************/

calendar.goToday = calendar.insertTbCell(trRow,2,"今天","center",3)

calendar.goToday.title="选择今天 快捷键:T"

calendar.goToday.onclick=function(){

if(calendar.returnTime)

calendar.sltDate=calendar.today[0]+"-"+calendar.formatTime(calendar.today[1])+"-"+calendar.formatTime(calendar.today[2])+" "+calendar.formatTime(calendar.today[3])+":"+calendar.formatTime(calendar.today[4])

else

calendar.sltDate=calendar.today[0]+"-"+calendar.formatTime(calendar.today[1])+"-"+calendar.formatTime(calendar.today[2])

calendar.target.value=calendar.sltDate

calendar.hide()

//calendar.show(calendar.target,calendar.today[0]+"-"+calendar.today[1]+"-"+calendar.today[2],calendar.source)

}

/*********** Calendar NextMonth Button ***************/

calendar.nextMonth = calendar.insertTbCell(trRow,3,">","center")

calendar.nextMonth.title="下一月 快捷键:→"

calendar.nextMonth.onmousedown=function(){

calendar.currentDate[1]++

if(calendar.currentDate[1]==13){

calendar.currentDate[1]=1

calendar.currentDate[0]++

}

calendar.show(calendar.target,calendar.returnTime,calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(calendar.currentDate[2]),calendar.source)

}

/*********** Calendar NextYear Button ***************/

calendar.nextYear = calendar.insertTbCell(trRow,4,">>","center")

calendar.nextYear.title="下一年 快捷键:↓"

calendar.nextYear.onmousedown=function(){

calendar.currentDate[0]++

calendar.show(calendar.target,calendar.returnTime,calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(calendar.currentDate[2]),calendar.source)

}

trRow = tbBoard.insertRow(2)

var cnDateName = new Array("日","一","二","三","四","五","六")

for (var i = 0i <7i++) {

tbCell=trRow.insertCell(i)

tbCell.innerText=cnDateName[i]

tbCell.align="center"

tbCell.width=35

tbCell.style.cssText="cursor:defaultborder:1 solid #99CCCCbackground-color:#99CCCC"

}

/*********** Calendar Body ***************/

trRow = tbBoard.insertRow(3)

tbCell=trRow.insertCell(0)

tbCell.colSpan=7

tbCell.height=97

tbCell.vAlign="top"

tbCell.bgColor="#F0F0F0"

var tbBody=document.createElement("table")

tbCell.insertAdjacentElement("beforeEnd",tbBody)

tbBody.style.cssText="position:relativetop:0left:0width:245height:103font-size:9pt"

tbBody.cellPadding=0

tbBody.cellSpacing=1

calendar.body=tbBody

/*********** Time Body ***************/

trRow = tbBoard.insertRow(4)

tbCell=trRow.insertCell(0)

calendar.prevHours = calendar.insertTbCell(trRow,0,"-","center")

calendar.prevHours.title="小时调整 快捷键:Home"

calendar.prevHours.onmousedown=function(){

calendar.currentDate[3]--

if(calendar.currentDate[3]==-1) calendar.currentDate[3]=23

calendar.bottom.innerText=calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4])

}

tbCell=trRow.insertCell(1)

calendar.nextHours = calendar.insertTbCell(trRow,1,"+","center")

calendar.nextHours.title="小时调整 快捷键:End"

calendar.nextHours.onmousedown=function(){

calendar.currentDate[3]++

if(calendar.currentDate[3]==24) calendar.currentDate[3]=0

calendar.bottom.innerText=calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4])

}

tbCell=trRow.insertCell(2)

tbCell.colSpan=3

tbCell.bgColor="#99CCFF"

tbCell.align="center"

tbCell.style.cssText = "cursor:default"

calendar.bottom=tbCell

tbCell=trRow.insertCell(3)

calendar.prevMinutes = calendar.insertTbCell(trRow,3,"-","center")

calendar.prevMinutes.title="分钟调整 快捷键:PageUp"

calendar.prevMinutes.onmousedown=function(){

calendar.currentDate[4]--

if(calendar.currentDate[4]==-1) calendar.currentDate[4]=59

calendar.bottom.innerText=calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4])

}

tbCell=trRow.insertCell(4)

calendar.nextMinutes = calendar.insertTbCell(trRow,4,"+","center")

calendar.nextMinutes.title="分钟调整 快捷键:PageDown"

calendar.nextMinutes.onmousedown=function(){

calendar.currentDate[4]++

if(calendar.currentDate[4]==60) calendar.currentDate[4]=0

calendar.bottom.innerText=calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4])

}

}

/************** 加入功能按钮公共样式 *********************/

this.insertTbCell=function(trRow,cellIndex,TXT,trAlign,tbColSpan){

var tbCell=trRow.insertCell(cellIndex)

if(tbColSpan!=undefined) tbCell.colSpan=tbColSpan

var btnCell=document.createElement("button")

tbCell.insertAdjacentElement("beforeEnd",btnCell)

btnCell.value=TXT

btnCell.style.cssText="width:100%border:1 outsetbackground-color:buttonface"

btnCell.onmouseover=function(){

btnCell.style.cssText="width:100%border:1 outsetbackground-color:#F0F0F0"

}

btnCell.onmouseout=function(){

btnCell.style.cssText="width:100%border:1 outsetbackground-color:buttonface"

}

// btnCell.onmousedown=function(){

// btnCell.style.cssText="width:100%border:1 insetbackground-color:#F0F0F0"

// }

btnCell.onmouseup=function(){

btnCell.style.cssText="width:100%border:1 outsetbackground-color:#F0F0F0"

}

btnCell.onclick=function(){

btnCell.blur()

}

return btnCell

}

this.setDefaultDate=function(){

var dftDate=new Date()

calendar.today[0]=dftDate.getYear()

calendar.today[1]=dftDate.getMonth()+1

calendar.today[2]=dftDate.getDate()

calendar.today[3]=dftDate.getHours()

calendar.today[4]=dftDate.getMinutes()

}

/****************** Show Calendar *********************/

this.show=function(targetObject,returnTime,defaultDate,sourceObject){

if(targetObject==undefined) {

alert("未设置目标对象. \n方法: ATCALENDAR.show(obj 目标对象,boolean 是否返回时间,string 默认日期,obj 点击对象)\n\n目标对象:接受日期返回值的对象.\n默认日期:格式为\"yyyy-mm-dd\",缺省为当前日期.\n点击对象:点击这个对象弹出calendar,默认为目标对象.\n")

return false

}

else calendar.target=targetObject

if(sourceObject==undefined) calendar.source=calendar.target

else calendar.source=sourceObject

if(returnTime) calendar.returnTime=true

else calendar.returnTime=false

var firstDay

var Cells=new Array()

if((defaultDate==undefined) || (defaultDate=="")){

var theDate=new Array()

calendar.head.innerText = calendar.today[0]+"-"+calendar.formatTime(calendar.today[1])+"-"+calendar.formatTime(calendar.today[2])

calendar.bottom.innerText = calendar.formatTime(calendar.today[3])+":"+calendar.formatTime(calendar.today[4])

theDate[0]=calendar.today[0]theDate[1]=calendar.today[1]theDate[2]=calendar.today[2]

theDate[3]=calendar.today[3]theDate[4]=calendar.today[4]

}

else{

var Datereg=/^\d{4}-\d{1,2}-\d{2}$/

var DateTimereg=/^(\d{1,4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/

if((!defaultDate.match(Datereg)) &&(!defaultDate.match(DateTimereg))){

alert("默认日期(时间)的格式不正确!\t\n\n默认可接受格式为:\n1、yyyy-mm-dd \n2、yyyy-mm-dd hh:mm\n3、(空)")

calendar.setDefaultDate()

return

}

if(defaultDate.match(Datereg)) defaultDate=defaultDate+" "+calendar.today[3]+":"+calendar.today[4]

var strDateTime=defaultDate.match(DateTimereg)

var theDate=new Array(4)

theDate[0]=strDateTime[1]

theDate[1]=strDateTime[2]

theDate[2]=strDateTime[3]

theDate[3]=strDateTime[4]

theDate[4]=strDateTime[5]

calendar.head.innerText = theDate[0]+"-"+calendar.formatTime(theDate[1])+"-"+calendar.formatTime(theDate[2])

calendar.bottom.innerText = calendar.formatTime(theDate[3])+":"+calendar.formatTime(theDate[4])

}

calendar.currentDate[0]=theDate[0]

calendar.currentDate[1]=theDate[1]

calendar.currentDate[2]=theDate[2]

calendar.currentDate[3]=theDate[3]

calendar.currentDate[4]=theDate[4]

theFirstDay=calendar.getFirstDay(theDate[0],theDate[1])

theMonthLen=theFirstDay+calendar.getMonthLen(theDate[0],theDate[1])

//calendar.setEventKey()

calendar.calendarPad.style.display=""

var theRows = Math.ceil((theMonthLen)/7)

//清除旧的日历

while (calendar.body.rows.length >0) {

calendar.body.deleteRow(0)

}

//建立新的日历

var n=0day=0

for(i=0i<theRowsi++){

theRow=calendar.body.insertRow(i)

for(j=0j<7j++){

n++

if(n>theFirstDay &&n<=theMonthLen){

day=n-theFirstDay

calendar.insertBodyCell(theRow,j,day)

}

else{

var theCell=theRow.insertCell(j)

theCell.style.cssText="background-color:#F0F0F0cursor:default"

}

}

}

//****************调整日历位置**************//

var offsetPos=calendar.getAbsolutePos(calendar.source)//计算对象的位置

if((document.body.offsetHeight-(offsetPos.y+calendar.source.offsetHeight-document.body.scrollTop))<calendar.calendarPad.style.pixelHeight){

var calTop=offsetPos.y-calendar.calendarPad.style.pixelHeight

}

else{

var calTop=offsetPos.y+calendar.source.offsetHeight

}

if((document.body.offsetWidth-(offsetPos.x+calendar.source.offsetWidth-document.body.scrollLeft))>calendar.calendarPad.style.pixelWidth){

var calLeft=offsetPos.x

}

else{

var calLeft=calendar.source.offsetLeft+calendar.source.offsetWidth

}

//alert(offsetPos.x)

calendar.calendarPad.style.pixelLeft=calLeft

calendar.calendarPad.style.pixelTop=calTop

}

/****************** 计算对象的位置 *************************/

this.getAbsolutePos = function(el) {

var r = { x: el.offsetLeft, y: el.offsetTop }

if (el.offsetParent) {

var tmp = calendar.getAbsolutePos(el.offsetParent)

r.x += tmp.x

r.y += tmp.y

}

return r

}

//************* 插入日期单元格 **************/

this.insertBodyCell=function(theRow,j,day,targetObject){

var theCell=theRow.insertCell(j)

if(j==0) var theBgColor="#FF9999"

else var theBgColor="#FFFFFF"

if(day==calendar.currentDate[2]) var theBgColor="#CCCCCC"

if(day==calendar.today[2]) var theBgColor="#99FFCC"

theCell.bgColor=theBgColor

theCell.innerText=day

theCell.align="center"

theCell.width=35

theCell.style.cssText="border:1 solid #CCCCCCcursor:hand"

theCell.onmouseover=function(){

theCell.bgColor="#FFFFCC"

theCell.style.cssText="border:1 outsetcursor:hand"

}

theCell.onmouseout=function(){

theCell.bgColor=theBgColor

theCell.style.cssText="border:1 solid #CCCCCCcursor:hand"

}

theCell.onmousedown=function(){

theCell.bgColor="#FFFFCC"

theCell.style.cssText="border:1 insetcursor:hand"

}

theCell.onclick=function(){

if(calendar.returnTime)

calendar.sltDate=calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(day)+" "+calendar.formatTime(calendar.currentDate[3])+":"+calendar.formatTime(calendar.currentDate[4])

else

calendar.sltDate=calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(day)

calendar.target.value=calendar.sltDate

calendar.hide()

}

}

/************** 取得月份的第一天为星期几 *********************/

this.getFirstDay=function(theYear, theMonth){

var firstDate = new Date(theYear,theMonth-1,1)

return firstDate.getDay()

}

/************** 取得月份共有几天 *********************/

this.getMonthLen=function(theYear, theMonth) {

theMonth--

var oneDay = 1000 * 60 * 60 * 24

var thisMonth = new Date(theYear, theMonth, 1)

var nextMonth = new Date(theYear, theMonth + 1, 1)

var len = Math.ceil((nextMonth.getTime() - thisMonth.getTime())/oneDay)

return len

}

/************** 隐藏日历 *********************/

this.hide=function(){

//calendar.clearEventKey()

calendar.calendarPad.style.display="none"

}

/************** 从这里开始 *********************/

this.setup=function(defaultDate){

calendar.addCalendarPad()

calendar.addCalendarBoard()

calendar.setDefaultDate()

}

/************** 格式化时间 *********************/

this.formatTime = function(str) {

str = ("00"+str)

return str.substr(str.length-2)

}

/************** 关于AgetimeCalendar *********************/

this.about=function(){

var strAbout = "\nWeb 日历选择输入控件操作说明:\n\n"

strAbout+="-\t: 关于\n"

strAbout+="x\t: 隐藏\n"

strAbout+="<<\t: 上一年\n"

strAbout+="<\t: 上一月\n"

strAbout+="今日\t: 返回当天日期\n"

strAbout+=">\t: 下一月\n"

strAbout+="<<\t: 下一年\n"

strAbout+="\nWeb日历选择输入控件\tVer:v1.0\t\nDesigned By:wxb \t\t2004.11.22\t\n"

alert(strAbout)

}

document.onkeydown=function(){

if(calendar.calendarPad.style.display=="none"){

window.event.returnValue= true

return true

}

switch(window.event.keyCode){

case 27 : calendar.hide()break//ESC

case 37 : calendar.prevMonth.onmousedown()break//←

case 38 : calendar.prevYear.onmousedown()break//↑

case 39 : calendar.nextMonth.onmousedown()break//→

case 40 : calendar.nextYear.onmousedown()break//↓

case 84 : calendar.goToday.onclick()break//T

case 88 : calendar.hide()break //X

case 72 : calendar.about()break //H

case 36 : calendar.prevHours.onmousedown()break//Home

case 35 : calendar.nextHours.onmousedown()break//End

case 33 : calendar.prevMinutes.onmousedown()break//PageUp

case 34 : calendar.nextMinutes.onmousedown()break//PageDown

}

window.event.keyCode = 0

window.event.returnValue= false

}

calendar.setup()

}

var CalendarWebControl = new atCalendarControl()

</script>

将上面一段javascript脚步放在你网页得<head></head>内,在<body></body>内使用以下文本框调用.

<input name="riqi" onFocus="CalendarWebControl.show(this,false,this.value)" size="32" style="float: left">

这样直接就可以把你选择得日期添加到文本框内了,比你那个选择三次得方法要简单.

1980 10月27日,由于一种状态信息病毒出人意料的自我繁殖,ARPANET完全停止运行。 BBN的第一部基于C/30的IMP。

1981 BITNET,Because It’s Time NETwork。 首先美国纽约市立大学建立的合作网络,连接的第一个节点是耶鲁大学。(:feg:)

根据同IBM系统一道提供的免费NJE协议,最初名字缩写中的T代表的是There而不是Time。

提供电子邮件服务、建立了电子论坛服务器来传播信息,还提供文件传输服务。

由美国国家科学基金会提供启动资金,Univ of Delaware、Purdue Univ、Univ of Wisconsin、RAND公司和BBN的计算机科学家们合作建立了CSNET(计算机科学网络),为那些不能与ARPANET连接的科学家提供网络服务(主要是电子邮件服务)。CSNET后来又被称为计算机与科学网络。(:amk,lhl:)

基于C/30的IMP在网络中占主导地位;SAC的第一部急于C/30的TIP。

法国Telecom公司在法国全境部署Minitel(Teletel)网。

Vernor Vinge出版小说True Names。(:pds:)

RFC 801: NCP/TCP Transition Plan

1982 挪威采用TCP/IP协议,经SANNET接入Internet;UCL也以同样的方式接入。 DCA和ARPA为ARPANET制定传输控制协议(TCP)和网际协议(IP),作为一组协议,通常称为TCP/IP协议。

由此第一次引出了关于互连网络的定义,即将internet定义为使用TCP/IP连接起来的一组网络; Internet则是通过TCP/IP协议连接起来的internet。

美国国防部(DoD)宣布将TCP/IP协议作为DoD标准网络协议。(:vgc:)

EUUG建立EUnet(欧洲Unix网),提供email和USENET服务。(:glg:)

最初连接的国家有荷兰、丹麦、瑞典和英国。

外部网关协议(EGP,RFC 827),EGP用于网络间的网关。

1983 美国威斯康星大学开发了名字服务器,这样,用户不需要了解到另一个节点的确切路径就可以与其进行通信。 ARPANET从NCP协议切换为TCP/IP协议。(1983年1月1日)

不再使用Honeywell或者多总线(Pluribus)IMP,TIP被TAC(terminal access controller,终端访问控制机)代替。

Stuttgart和韩国上网。

年初欧洲开始建立运动信息网(MINET),9月接入Internet。

CSNET与ARPANET的网关开始启用。

ARPANET分成ARPANET和MILNET两部分,后者并入1982年建立的国防数据网。现存113个节点中的68个进入MILNET。

开始出现工作站,它们大多使用包含有IP网络协议的Berkeley Unix(4.2 BSD)操作系统。(:mpc:)

连网需求从每个节点单独的大型分时计算机系统与Internet相连转为将一个局域网络与Internet相连。

建立Internet行动委员会(IAB),取代了ICCB。

EARN(欧洲科学研究网)建立,它同BITNET非常相似,使用IBM公司赞助的网关硬件。

Tom Jennings建立Fidonet。

1984 引入名字服务器系统(DNS)。 主机数超过1,000。

使用UUCP协议的JUNET(日本Unix网)建成。

英国使用Coloured Book协议建成JANET(联合学术网),就是以前的SERCnet。

USENET建立人工管理新闻组(mod.*)

William Gibson完成Neuromancer。

加拿大开始用一年的时间将大学连网的努力。从多伦多向Ithaca连接,NetNorth Network连入BITNET。(:kf1:)

Kremvax的消息宣布苏联连入USENET。

1985 全球电子连接(WELL)开始提供服务。 原由DCA和SRI负责的DNS根域名管理的职责移交给USC的信息科学学院(ISI),负责进行DNS NIC的注册管理。

1985年3月15日Symbolics.com成为第一个登记的域名。最初的其他几个域名是:cmu.edu、purdue.edu、rice.edu、ucla.edu(4月);css.gov(6月);mitre.org、.uk(7月)。

加拿大横跨东西海岸的铁路铺设用了100年的时间,而从开始到最后一个加拿大的大学连入NetNorth只用了1年的时间。(:kf1:)

RFC 968:’Twas the Night Before Start-up

1986 NSFnet建成(主干网速率为56K bps)。 NSF在美国建立了五个超级计算中心,为所有用户提供强大的计算能力。(Princeton的JVNC,Pittsburgh的PSC,UCSD的SDSC,UIUC的NCSA,Cornell的Theory Center)

这掀起了一个与Internet连接的高潮,尤其是各大学。

NSF资助的SDSCNET、JVNCNET、SURANET、NYSERNET开始运营。(:sw1:)

IAB成立Internet工程特别工作(IETF)和Internet研究特别工作组。IETF第一次会议1月在San Diego的Linkabit召开。

在公共计算协会(SoPAC)的赞助下,1986年7月16日第一次Freenet会议上网召开(Cleveland)。Freenet后续议程的管理由1989年国家公共远程计算网络(NPTN)负责管理。(:sk2,rab:)

为提高USENET新闻在TCP/IP网络上的传输效率,制定了网络新闻传输协议(NNTP)。

为使非IP网络拥有域地址,Craig Partridge开发了邮件交换器(MX)记录。

USENET更名,它的人工管理新闻组1987年更名。

使用高速连接线路的BARRNET(海湾地区研究网络)建成并与1987年开始运营。

AT&T公司在新泽西州的Newark和纽约州的White Plains之间的传输光纤线路中断,导致新英格兰州州与Internet的连接中断。新英格兰州的7条ARPANET主干网都连在一起,它们在12月12日东部时间1:11到12:11间停止运行。

1987 NSF签定合作协议,将NSFnet主干网的管理权移交给Merit网络公司(IBM公司和MCI公司又同Merit公司签定协议,三家共同参与管理)。IBM公司、MCI公司、Merit公司后来联合成立了ANS。 在Usenix基金的支持下建立了UUNET,提供商业的UUCP服务和USENET服务。最初的UUNET实验由Rick Adams和Mike O’Dell完成。

3月,第一届TCP/IP Interoperability会议召开。1988年会议改名为INTEROP。

在德国和中国间采用CSNET协议建立了email连接,9月20日从中国发出了第一封信。(:wz1:)

第1000份RFC文件:Request For Comments reference guide。

主机数超过10,000。

BITNET的主机数超过1,000。

1988 11月2日 - Internet蠕虫在Internet上蔓延,全部60,000个节点中的大约6,000个节点受到影响。(:ph1:) 莫立斯蠕虫事件促使DARPA建立了CERT(计算机危机快速反应小组)以应付此类事件。蠕虫是CERT年内受到咨询的唯一的一件事情。

美国国防部采纳OSI协议,将TCP/IP作为过渡。美国的政府OSI大纲(GOSIP)公布了美国政府部门采购的产品所必须支持的一组协议。(:gck:)

在没有使用联邦基金的情况下建立了Los Nettos网络,网络由当地的一些机构(包括Caltech、TIS、UCLA、USC、ISI)支持。

NSFNET主干网速率升级到T1(1.544M bps)。

在Susan Estrada资助下建立了CERFnet(加里福尼亚教育与研究联合网)。

12月以Jon Postel为首的Internet Assigned Numbers Authority(IANA)成立。Postel多年来还是REC文件编辑和美国域名注册管理者。

Jarkko Oikarinen开发了Internet网上聊天(IRC)。(:zby:)

加拿大的地区网络第一次连入NSFNET:ONet通过Cornell、RISQ通过Princeton、BCnet通过华盛顿大学。(:ec1:)

FidoNet连入Internet,可以交换email和网络新闻。(:tp1:)

1988年夏季在Stanford和BBN间建立了第一个多址传送通道。

连入NSFNET的国家: 加拿大(CA)、丹麦(DK)、芬兰(FI)、法国(FR)、冰岛(IC)、挪威(NO)、瑞典(SE)。

1989 主机数超过100,000。 欧洲提供Internet服务的公司建立了RIPE(Reseaux IP Europeens),为泛欧洲的IP网络提供管理和技术上的支持。(:glg:)

商业电子邮件系统第一次同Internet进行邮件接力传递:MCI邮递公司通过National Research Initiative(CNRI)、 Compuserv通过Ohio大学进行邮件交换。(:jg1,ph1:)

CSNET并入BITNET,成立了研究与教育合作网(CREN)。(8月)

AARNET - 澳大利亚科学研究网 - 由AVCC和CSIRO建立,并于第二年年开始提供服务。(:gmc:)

Clifford Stoll完成了布谷鸟的蛋一书,讲述了关于德国的一个密码破译小组通过网络入侵到美国的多台计算机设施中的真实故事。

UCLA资助Act One研讨会,以庆祝ARPANET建成20周年和它的功成身退。(8月)

RFC 1121: Act One - The Poems

RFC 1097: TELNET SUBLIMINAL-MESSAGE Option

连入NSFNET的国家:澳大利亚(AU)、德国(DE)、以色列(IL)、意大利(IT)、日本(JP)、墨西哥(MX)、荷兰(NL)、新西兰(NZ)、波多黎哥(PR)、英国(UK)。

<HTML><HEAD><TITLE>日期选择 </TITLE>

<META content="text/html charset=gb2312" http-equiv=Content-Type>

<META content="MSHTML 5.00.2014.210" name=GENERATOR></HEAD>

<SCRIPT language="javascript">

<!--

var gdCtrl = new Object()

var goSelectTag = new Array()

var gcGray = "#808080"

var gcToggle = "#ffff00"

var gcBG = "#99CCFF"

var previousObject = null

var gdCurDate = new Date()

var giYear = gdCurDate.getFullYear()

var giMonth = gdCurDate.getMonth()+1

var giDay = gdCurDate.getDate()

var gCalMode = ""

var gCalDefDate = ""

var CAL_MODE_NOBLANK = "2"

function fSetDate(iYear, iMonth, iDay){

  //VicPopCal.style.visibility = "hidden"

  if ((iYear == 0) && (iMonth == 0) && (iDay == 0)){

   gdCtrl.value = ""

  }else{

   iMonth = iMonth + 100 + ""

   iMonth = iMonth.substring(1)

   iDay   = iDay + 100 + ""

   iDay   = iDay.substring(1)

   gdCtrl.value = iYear+"-"+iMonth+"-"+iDay

  }

  

  for (i in goSelectTag)

   goSelectTag[i].style.visibility = "visible"

  goSelectTag.length = 0

  

  window.returnValue=gdCtrl.value

  window.close()

}

function HiddenDiv()

{

var i

  VicPopCal.style.visibility = "hidden"

  for (i in goSelectTag)

   goSelectTag[i].style.visibility = "visible"

  goSelectTag.length = 0

}

function fSetSelected(aCell){

  var iOffset = 0

  var iYear = parseInt(tbSelYear.value)

  var iMonth = parseInt(tbSelMonth.value)

  

  aCell.bgColor = gcBG

  with (aCell.children["cellText"]){

   var iDay = parseInt(innerText)

   if (color==gcGray)

iOffset = (Victor<10)?-1:1

/*** below temp patch by maxiang ***/

if( color == gcGray ){

iOffset = (iDay < 15 )?1:-1

}

/*** above temp patch by maxiang ***/

iMonth += iOffset

if (iMonth<1) {

iYear--

iMonth = 12

}else if (iMonth>12){

iYear++

iMonth = 1

}

  }

  fSetDate(iYear, iMonth, iDay)

}

function Point(iX, iY){

this.x = iX

this.y = iY

}

function fBuildCal(iYear, iMonth) {

  var aMonth=new Array()

  for(i=1i<7i++)

   aMonth[i]=new Array(i)

  

  var dCalDate=new Date(iYear, iMonth-1, 1)

  var iDayOfFirst=dCalDate.getDay()

  var iDaysInMonth=new Date(iYear, iMonth, 0).getDate()

  var iOffsetLast=new Date(iYear, iMonth-1, 0).getDate()-iDayOfFirst+1

  var iDate = 1

  var iNext = 1

  for (d = 0 d < 7 d++)

aMonth[1][d] = (d<iDayOfFirst)?-(iOffsetLast+d):iDate++

  for (w = 2 w < 7 w++)

   for (d = 0 d < 7 d++)

aMonth[w][d] = (iDate<=iDaysInMonth)?iDate++:-(iNext++)

  return aMonth

}

function fDrawCal(iYear, iMonth, iCellHeight, sDateTextSize) {

  var WeekDay = new Array("日","一","二","三","四","五","六")

  var styleTD = " bgcolor='"+gcBG+"' bordercolor='"+gcBG+"' valign='middle' align='center' height='"+iCellHeight+"' style='font-size:12px "

  with (document) {

write("<tr>")

for(i=0 i<7 i++)

write("<td "+styleTD+" color:#990099' >" + WeekDay[i] + "</td>")

write("</tr>")

   for (w = 1 w < 7 w++) {

write("<tr>")

for (d = 0 d < 7 d++) {

write("<td id=calCell "+styleTD+"cursor:hand' onMouseOver='this.bgColor=gcToggle' onMouseOut='this.bgColor=gcBG' onclick='fSetSelected(this)'>")

write("<font id=cellText ><b> </b></font>")

write("</td>")

}

write("</tr>")

}

  }

}

function fUpdateCal(iYear, iMonth) {

  myMonth = fBuildCal(iYear, iMonth)

  var i = 0

  for (w = 0 w < 6 w++)

for (d = 0 d < 7 d++)

with (cellText[(7*w)+d]) {

Victor = i++

if (myMonth[w+1][d]<0) {

color = gcGray

innerText = -myMonth[w+1][d]

}else{

// Modified by maxiang for we need 

// Saturday displayed in blue font color.

//color = ((d==0)||(d==6))?"red":"black"

if( d == 0 ){

color = "red"

}else if( d == 6 ){

color = "blue"

}else{

color = "black"

}

// End of above maxiang

innerText = myMonth[w+1][d]

}

}

}

function fSetYearMon(iYear, iMon){

  tbSelMonth.options[iMon-1].selected = true

  for (i = 0 i < tbSelYear.length i++)

if (tbSelYear.options[i].value == iYear)

tbSelYear.options[i].selected = true

  fUpdateCal(iYear, iMon)

}

function fPrevMonth(){

  var iMon = tbSelMonth.value

  var iYear = tbSelYear.value

  

  if (--iMon<1) {

  iMon = 12

  iYear--

  }

  

  fSetYearMon(iYear, iMon)

}

function fNextMonth(){

  var iMon = tbSelMonth.value

  var iYear = tbSelYear.value

  

  if (++iMon>12) {

  iMon = 1

  iYear++

  }

  

  fSetYearMon(iYear, iMon)

}

function fToggleTags(){

  with (document.all.tags("SELECT")){

  for (i=0 i<length i++)

  if ((item(i).Victor!="Won")&&fTagInBound(item(i))){

  item(i).style.visibility = "hidden"

  goSelectTag[goSelectTag.length] = item(i)

  }

  }

}

function fTagInBound(aTag){

  with (VicPopCal.style){

   var l = parseInt(left)

   var t = parseInt(top)

   var r = l+parseInt(width)

   var b = t+parseInt(height)

var ptLT = fGetXY(aTag)

return !((ptLT.x>r)||(ptLT.x+aTag.offsetWidth<l)||(ptLT.y>b)||(ptLT.y+aTag.offsetHeight<t))

  }

}

function fGetXY(aTag){

  var oTmp = aTag

  var pt = new Point(0,0)

  do {

   pt.x += oTmp.offsetLeft

   pt.y += oTmp.offsetTop

   oTmp = oTmp.offsetParent

  } while(oTmp.tagName!="BODY")

  return pt

}

// Main: popCtrl is the widget beyond which you want this calendar to appear

//       dateCtrl is the widget into which you want to put the selected date.

// i.e.: <input type="text" autocomplete=off name="dc" style="text-align:center" readonly><INPUT type="button" value="V" onclick="fPopCalendar(dc,dc)return false">

function fPopCalendar(popCtrl, dateCtrl, mode, defDate){

gCalMode = mode

gCalDefDate = defDate

  if (popCtrl == previousObject){

   if (VicPopCal.style.visibility == "visible"){

   //HiddenDiv()

   return true

   }

  

  }

  previousObject = popCtrl

  gdCtrl = dateCtrl

  fSetYearMon(giYear, giMonth) 

  var point = fGetXY(popCtrl)

if( gCalMode == CAL_MODE_NOBLANK ){

document.all.CAL_B_BLANK.style.visibility = "hidden"

}else{

document.all.CAL_B_BLANK.style.visibility = "visible"

}

  with (VicPopCal.style) {

   left = point.x

top  = point.y+popCtrl.offsetHeight

width = VicPopCal.offsetWidth

height = VicPopCal.offsetHeight

fToggleTags(point) 

visibility = 'visible'

  }

}

var gMonths = new Array("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月")

with (document) {

write("<Div id='VicPopCal' style='OVERFLOW:hiddenPOSITION:absoluteVISIBILITY:hiddenborder:0px ridgewidth:100%height:100%top:0left:0z-index:100overflow:hidden'>")

write("<table border='0' bgcolor='#3366CC'>")

write("<TR>")

write("<td valign='middle' align='center'><input type='button' class='button' name='PrevMonth' value='<' style='height:20width:20FONT:bold' onClick='fPrevMonth()'>")

write("&nbsp<SELECT name='tbSelYear' onChange='fUpdateCal(tbSelYear.value, tbSelMonth.value)' Victor='Won'>")

for(i=1990i<giYear+20i++)

write("<OPTION value='"+i+"'>"+i+"年</OPTION>")

write("</SELECT>")

write("&nbsp<select name='tbSelMonth' onChange='fUpdateCal(tbSelYear.value, tbSelMonth.value)' Victor='Won'>")

for (i=0 i<12 i++)

write("<option value='"+(i+1)+"'>"+gMonths[i]+"</option>")

write("</SELECT>")

write("&nbsp<input type='button' class='button' name='PrevMonth' value='>' style='height:20width:20FONT:bold' onclick='fNextMonth()'>")

write("</td>")

write("</TR><TR>")

write("<td align='center'>")

write("<DIV style='background-color:#000066'><table width='100%' border='0'>")

fDrawCal(giYear, giMonth, 8, '12')

write("</table></DIV>")

write("</td>")

write("</TR><TR><TD align='center'>")

write("<TABLE width='100%'><TR><TD align='center'>")

write("<B ID=\"CAL_B_BLANK\" style='color:"+gcBG+" visibility:visible cursor:hand font-size:12px' onclick='fSetDate(0,0,0)' onMouseOver='this.style.color=gcToggle' onMouseOut='this.style.color=gcBG'>清空</B>")

write("</td><td algin='center'>")

write("<B style='color:"+gcBG+"cursor:hand font-size:12px' onclick='fSetDate(giYear,giMonth,giDay)' onMouseOver='this.style.color=gcToggle' onMouseOut='this.style.color=gcBG'>选择: "+giYear+"/"+giMonth+"/"+giDay+"</B>")

write("</td></tr></table>")

write("</TD></TR>")

write("</TABLE></Div>")

}

-->

</SCRIPT>

<BODY bgColor=#3D8BBC onload=fload()>

<SCRIPT>

function fload()

{

fPopCalendar(document.all.txt1, document.all.txt1)

}

function fkeydown()

{

if(event.keyCode==27){

event.returnValue = null

window.returnValue = null

window.close()

}

}

document.onkeydown=fkeydown

</SCRIPT>

<INPUT id=txt1 style="DISPLAY: none"> </BODY></HTML>

以上是日期控件  Calendar.htm  的代码

<!--#INCLUDE FILE="SelectDate.asp"--

 <form method="POST" name="myform"  action=" " target="_self">

 <input name="AddDate" type="text" id="AddDate" value="<%=date%>" maxlength="50">

              <input onClick="popUpcalendar(this, myform.AddDate, 'yyyy-mm-dd')" type="button" class="button" value="选择日期" title="选择日期">

              </form>

表单  名称myform

以下是SelectDate.asp 的内容

<SCRIPT language=javascript>

function popUpcalendar(ctl,obj,format)

{

    if (arguments.length==0){

  //如果是文本框的onmousedown世间是由脚本绑定的,且没有参数  modified by qiuchun

  if (event.srcElement){

    var pchild = event.srcElement

    if (pchild.type && pchild.type.toLowerCase() == "text")

      arguments[0] = pchild.id

  }

}

var x=event.screenX

var y=event.screenY

var result=window.showModalDialog('Calendar.htm','Calendar',"dialogLeft:"+x+"pxdialogTop:"+y+"pxdialogWidth:195pxdialogHeight:200pxhelp:nostatus:no")

//alert(arguments[0])

if(result!=null)

arguments[1].value=result

//eval(arguments[0]+".value=result")

return false

}

</SCRIPT>