亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

JavaScript的核心篇知識(shí)

原創(chuàng) 2018-12-09 16:57:31 212
摘要:本章當(dāng)中  有很多的知識(shí)html中的id  以及屬性的增加   和改變   用JavaScript里面的代碼去改變css     寫時(shí)間的  年月  天  時(shí) 分秒的  一個(gè)寫法 與知識(shí)點(diǎn)<!DOCTYPE html><html><head

本章當(dāng)中  有很多的知識(shí)


html中的id  以及屬性的增加   和改變   用JavaScript里面的代碼去改變css     寫時(shí)間的  年月  天  時(shí) 分秒的  一個(gè)寫法 與知識(shí)點(diǎn)


<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Document</title>

<script type="text/javascript">


var myday=new Date()

document.write(myday+"<br>")

document.write(myday.getFullYear()+"年")

document.write(myday.getMonth()+"月")

document.write("<br>")

var month=new Array(12)

    month[0]="1月"

    month[1]="2月"

    month[2]="3月"

    month[3]="4月"

    month[4]="5月"

    month[5]="6月"

    month[6]="7月"

    month[7]="8月"

    month[8]="9月"

    month[9]="10月"

    month[10]="11月"

    month[11]="12月"

   document.write("這個(gè)月是"+month[myday.getMonth()])

document.write("今天是星期"+myday.getDay())

document.write("今天是這個(gè)月的第"+myday.getDate()+'天')

document.write("<br>")

document.write("現(xiàn)在是"+myday.getHours()+"時(shí)")

document.write(myday.getMinutes()+"分")

document.write(myday.getSeconds()+"秒")

</script>


</head>

<body>


</body>


批改老師:韋小寶批改時(shí)間:2018-12-09 17:20:45
老師總結(jié):寫的很不錯(cuò)!下次記得給代碼加上高亮哦!課后要記得多練習(xí)!

發(fā)布手記

熱門詞條