现在的位置: 首页 > 综合 > 正文

[Javascript]发布一个自己写的日期控件:DateTimeList

2012年08月25日 ⁄ 综合 ⁄ 共 574字 ⁄ 字号 评论关闭
网上免费的日期控件有很多,博客园里也有一个博客园兄弟们的大作!
但个人不喜欢用层出来的东东,因为用层过iframe的话有时窗口不够大时会出现滚动条!
所以用showModalDialog弹出窗口写了个日期选择的JS。

喜欢的朋友可以随意用吧!

下载地址:/Files/HD/DateTimeList/DateTimeList.rar

里头有示例,只在IE6.0里调试通过,别的不知道!^o^
----------------------------------

使用方法:
一:
在所需的要页面的<head></head>区块中加入:<script src="DateTimeList/DateTimeList.js" language="javascript"></script>

二:主调函数:ShowDateTime( this,'DateTime' )或ShowDateTime( this,'Date' )或ShowDateTime( this,'Time' )

例如:
1:
<input type="text" id="txtTime" name="txtTime" onclick="ShowDateTime( this,'DateTime' );"/>
2:
<input type="button" onclick="ShowDateTime( this,'time' );" />

示例截图如下:

抱歉!评论已关闭.