英文时间代码

 

代码
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
dayName
= new Array("", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")
monName
= new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
now
= new Date
// End -->
</script>
<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var strDay;
if ((now.getDate() == 1) || (now.getDate() != 11) && (now.getDate() % 10 == 1)) // Correction for 11th and 1st/21st/31st
strDay = "st ";
else if ((now.getDate() == 2) || (now.getDate() != 12) && (now.getDate() % 10 == 2)) // Correction for 12th and 2nd/22nd/32nd
strDay = "nd ";
else if ((now.getDate() == 3) || (now.getDate() != 13) && (now.getDate() % 10 == 3)) // Correction for 13th and 3rd/23rd/33rd
strDay = "rd ";
else
strDay
= "th ";
document.write(
dayName[now.getDay()]
+
" the "
+
now.getDate()
+
strDay
+
"of "
+
monName[now.getMonth()]
+
", "
+
now.getFullYear()
)
// End -->
</script>

 

 

有具体时刻的:

 

<span     +    monName[now.getMonth()]+' '+    now.getFullYear()    +' '+    now.getHours()    +':'+    now.getMinutes()    +':'+    now.getSeconds();
   
    o.innerHTML=str;
   }
    getDATE()
window.setInterval(getDATE,1000)
</script>

 

 

 

相关文章:

  • 2021-12-01
  • 2022-12-23
  • 2021-04-18
  • 2021-08-03
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
  • 2022-02-17
相关资源
相似解决方案