获得月的名字

代码:

<!DOCTYPE html>

<html>

<body>

 

<p>VBScripts' function <b>MonthName</b> is used to get a month:</p>

<%

response.Write(MonthName(1))

response.Write("<br>")

response.Write(MonthName(2))

%>

 

<p>Abbreviated name of a month:</p>

<%

response.Write(MonthName(1,true))

response.Write("<br>")

response.Write(MonthName(2,true))

%>

 

<p>Current month:</p>

<%

response.Write(MonthName(month(date)))

response.Write("<br>")

response.Write(MonthName(month(date), true))

%>

 

</body>

</html>

结果:

VBScripts' function MonthName is used to get a month:

January
February

Abbreviated name of a month:

Jan
Feb

Current month:

October
Oct

相关文章