源代码:
<html> <body> <p>VBScripts' function <b>MonthName</b> is used to get a month:</p> <FONT COLOR=#ff0000><% response.Write(MonthName(1)) response.Write("<br />") response.Write(MonthName(2)) %></FONT> <p>Abbreviated name of a month:</p> <FONT COLOR=#ff0000><% response.Write(MonthName(1,true)) response.Write("<br />") response.Write(MonthName(2,true)) %></FONT> <p>Current month:</p> <FONT COLOR=#ff0000><% response.Write(MonthName(month(date))) response.Write("<br />") response.Write(MonthName(month(date), true)) %></FONT> </body> </html>
运行结果:
<html> <body> <p>VBScripts' function <b>MonthName</b> is used to get a month:</p> <FONT COLOR=#ff0000><% response.Write(MonthName(1)) response.Write("<br />") response.Write(MonthName(2)) %></FONT> <p>Abbreviated name of a month:</p> <FONT COLOR=#ff0000><% response.Write(MonthName(1,true)) response.Write("<br />") response.Write(MonthName(2,true)) %></FONT> <p>Current month:</p> <FONT COLOR=#ff0000><% response.Write(MonthName(month(date))) response.Write("<br />") response.Write(MonthName(month(date), true)) %></FONT> </body> </html>