就业数据资源平台
当前位置:首页 > Web程序设计
全国计算机等级考试二级《web程序设计》习题12

用VBScript设计一个页面,显示一个数字时钟,格式如03:16:47 PM


  请补全如下代码:


     


   


  timerid=window.settimeout("clock()",1000)


  sub clock() 


  hours=_______ 


  minutes=________ 


  seconds=________ 


  if hours>12  then 


  mark = "PM"


  hours = hours-12


  end if


  if hours=0  then hours=12


  if hours<10 then hours="0"________ 


  if minutes<10 then minutes="0"______


  if seconds<10 then seconds="0"_______ 


  nowtime= ______________


  ___________.innerhtml=nowtime 


  timerid=_____________


  end sub 


   


    


   


   


  答:


  hour(now)


  minute(now)


  second(now)


  &hours


  &minutes


  &seconds


  hours&":"&minutes&":"&seconds&" "&mark


  nowT


  window.settimeout("clock()",1000)

就业数据资源平台