欢迎你的访问
 
返回天空素材库首页 http://www.Skysucai.com  
收藏本站
将本站设为首页
您当前的位置:天空素材首页 -> 个人网页特效-有前后日期
 
栏 目 导 航
. 常用代码 . 综合特效
. 状态特效 . 游戏特效
. 页面背景 . 页面特效
. 页面导航 . 文本操作
. 文本特效 . 图形特效
. 鼠标特效 . 时间日期
. 密码特效 . 浏览相关
. 警告对话 . 技巧特效
. 计数转换 . 测试搜索
. 代码生成 . 播放音乐
. 按钮特效 . 系统相关
. 链接特效 . 黑客性质
. 相关特效 . 窗口特效
. 广告特效 . 表单表格
. 模拟例子
相 关 文 章
本 类 热 门
· 星期查询特效
· 农历日历挂历特效代码...
· 状态栏时间跳动特效
· 农历挂历特效
· 中文星期网页特效
· 真正的万年历
· 浮动的时钟
· 特酷的日期显示代码
· 网页特效 菜单-会动的...
· 网页特效 时间-任意位...
· 经典网页特效-显示他人...
· 最新网页特效-时钟是在...
更多  
 
 
更多  
最 新 推 荐
· 状态栏时间跳动特效
· 农历挂历特效
· 真正的万年历
· 网页特效 菜单-会动的...
· 网页特效 时间-任意位...
· 个人网页特效-有前后日...
· 时间每过一秒,Radio就...
· 时钟显示在任意指定位...
· 带开关的Form时钟
· 记录几天后的日期
· 显示登陆时间
· 退出时显示访问时间
更多  
     
个人网页特效-有前后日期
个人网页特效-有前后日期
作者:无  来源:本站整理  名称:个人网页特效-有前后日期 

减小字体 增大字体

       

[提示:你可先按照下面代码提示修改 上面部分代码,再按运行,此处看到的演示不完全正确]

此特效的详细完整代码如下:

<FORM>

 

<SELECT NAME="dates" SIZE=1>

 

<SCRIPT LANGUAGE="JavaScript">

 

 

 

//--------------------------------------------

 

// By mattias.sjoberg@swipnet.se 26/7-97

 

// The JavaScript Planet

 

// http://www.geocities.com/SiliconValley/7116

 

// You're welcome to use/edit this script,

 

// just keep the comments and drop me a note.

 

//--------------------------------------------

 

 

 

        today = new Date();

 

        thismonth = today.getMonth() + 1;

 

        thisyear = today.getYear();

 

        thisday = today.getDate();

 

 

 

        maxdays=31;//default

 

 

 

        // months with 30 days

 

        if (thismonth==4 || thismonth==6 || thismonth==9 || thismonth==11)

 

        {

 

                maxdays=30

 

        }

 

 

 

        // february, leap year

 

        if (thismonth==2)

 

        {

 

                // feb

 

                if ((thisyear/4)!=parseInt(thisyear/4))

 

                {

 

                        maxdays=28

 

                }

 

                else

 

                {

 

                        //leap year

 

                        maxdays=29

 

                }

 

        }

 

 

 

        thismonth = "" + thismonth

 

        if (thismonth.length == 1)

 

        {

 

                thismonth = "0" + thismonth;

 

        }

 

 

 

        for (var theday = 0; theday <= maxdays; theday++)

 

        {

 

                if (theday == 0)

 

                {

 

                        document.write ("<OPTION SELECTED> "+ thisday + "-" + thismonth + "-" + thisyear )

 

                        document.write ("<OPTION> ========")

 

                }

 

                else

 

                {

 

                        var thed = "" + theday

 

                        if (thed.length == 1)

 

                        {

 

                                thed = "0" + thed;

 

                        }

 

                        document.write ("<OPTION> " + thed + "-" + thismonth + "-" + thisyear)

 

                }

 

        }

 

 

 

</SCRIPT>

 

</SELECT>

 

</FORM>


[返回上一页] [打印个人网页特效-有前后日期]
     
| 关于本站 | 服务条款 | 友情连接 | 网站地图 | 联系方式 | 广告联系 |