找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 241|回复: 5

时间函数应用和response.write的大集合

[复制链接]
发表于 2009-5-22 06:36:20 | 显示全部楼层 |阅读模式 IP:江苏南通
时间函数应用和response.write的大集合

收集了一下,供需要的朋友用

<br />
(情缘站长教程网 Www.XiuGoo.Com)
<br />
lt;% @Language=VBScript %&gt;<br />
lt;% Option Explicit%&gt;<br />
lt;html&gt;<br />
lt;body&gt;<br />
<br />
现在时刻是::<br />
nbsp;&nbsp;&lt;%&nbsp; &nbsp;dim a<br />
nbsp;&nbsp;a=Time()<br />
response.write(a)'内部可以直接写函数的,<br />
nbsp;&nbsp;%&gt;<br />
nbsp; &nbsp;今天为&lt;%response.write(Date())%&gt;<br />
lt;%<br />
nbsp; &nbsp;dim weekday<br />
nbsp; &nbsp;weekday=DatePart(&quot;w&quot;,Date())<br />
nbsp; &nbsp;select case weekday<br />
nbsp; &nbsp;case&quot;1&quot;<br />
nbsp; &nbsp; response.write(&quot;&lt;b&gt;星期日&lt;/b&gt;&lt;br&gt;&quot;)<br />
nbsp;&nbsp;response.write&quot;&lt;b&gt;星期日&lt;/b&gt;&lt;br&quot;&nbsp;&nbsp;'这两种都是正确的,第二种是第一中的简单书写<br />
nbsp; &nbsp;response.write(weekday)&nbsp;&nbsp;'这一种是写出变量的方法<br />
nbsp; &nbsp; case &quot;2&quot;<br />
nbsp; &nbsp;&nbsp; &nbsp;response.write&quot;&lt;b&gt;星期一&lt;/b&gt;&quot; <br />
nbsp; &nbsp;case &quot;3&quot;<br />
nbsp; &nbsp;&nbsp; &nbsp;response.write&quot;&lt;b&gt;星期二&lt;/b&gt;&quot;&nbsp; &nbsp;<br />
nbsp; &nbsp;&nbsp;&nbsp;case &quot;4&quot;<br />
nbsp; &nbsp;&nbsp; &nbsp;response.write&quot;&lt;b&gt;星期三&lt;/b&gt;&quot; <br />
nbsp; &nbsp;case &quot;5&quot;<br />
nbsp; &nbsp;&nbsp; &nbsp;response.write&quot;&lt;b&gt;星期四&lt;/b&gt;&quot;&nbsp; &nbsp;<br />
nbsp; &nbsp;&nbsp;&nbsp;case &quot;6&quot;<br />
nbsp; &nbsp;&nbsp; &nbsp;response.write&quot;&lt;b&gt;星期五&lt;/b&gt;&quot; <br />
nbsp; &nbsp;case &quot;7&quot;<br />
nbsp; &nbsp;&nbsp; &nbsp;response.write&quot;&lt;b&gt;星期六&lt;/b&gt;&quot;&nbsp; &nbsp;<br />
nbsp; &nbsp; end select<br />
%gt;<br />
lt;br&gt; <br />
nbsp;&nbsp;今天的日期是:&lt;%response.write(date())%&gt;&lt;br&gt;<br />
nbsp;&nbsp;现在时间是:&lt;%response.write(Time()) %&gt; <br />
nbsp;&nbsp;&lt;Br&gt;<br />
nbsp;&nbsp;今天的日期是: &lt;% response.write(year(date()))%&gt;<br />
nbsp; &nbsp;今天的日期是: &lt;% response.write(year(date)) %&gt; 年&nbsp;&nbsp;<br />
nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;% response.write(month(date)) %&gt; 月<br />
nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &lt;% response.write(day(date)) %&gt;日 <br />
lt;BR&gt;<br />
nbsp; &nbsp;现在时间是&lt;% response.write(Now()) %&gt;&nbsp; &nbsp; <br />
nbsp; &nbsp;&lt;BR&gt;<br />
现在时间是lt;% response.write(hour(Now())) %&gt; 时<br />
nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;% response.write(minute(Now())) %&gt;分<br />
nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;% response.write(second(Now())) %&gt;秒<br />
nbsp;&nbsp;&lt;/body&gt;<br />
lt;/html&gt;<br />
<br />
<br />
<br />
复制代码
发表于 2009-12-27 13:05:04 | 显示全部楼层 IP:新西兰
好贴就是好贴。。。
回复

使用道具 举报

发表于 2010-1-30 05:05:05 | 显示全部楼层 IP:北京
加油啊!!!!顶哦!!!!!支持楼主,支持你~
回复

使用道具 举报

发表于 2010-2-4 18:05:04 | 显示全部楼层 IP:日本
一楼的位置好啊..我考,这是一种文明,我指 的是回帖。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 13:24 , Processed in 0.217615 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表