JAVA Tips
เทคนิคสำหรับ web ของคุณ


jv0016 : Show Date : แสดงวันที่บน web page


คำสั่งนี้สำหรับแสดงวันที่บน web page สนใจก็นำไปใช้งานได้ เพียง copy code เหล่านี้ไปใช้




<script>
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()+1
if (month<10)
month="0"+month
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
document.write("<small><font color='000000' face='Arial'><b>"+daym+"/"+month+"/"+year+"</b></font></small>")
</script >


ผลของการรัน





Copyright ® 2000-2001 IT-Guides.Com all right reserve
Always Online