如何创建时间函数?

在表格中如何实现检测时间输入是否正确?
比如约束用户输入 80-01-12

有的网页上看看关时填写时间可以点鼠标选择年月日,
这些函数在网上有现成的吗?
哪里可以得到?
谢谢!
---------------------------------------------------------------

用正则表达式很简单

1<script>   
2function checkstru(str)   
3var ys = /^\d{2}-\d{2}-d{2}\d$/;   
4var tf = str.test(ys);   
5if(!tf){   
6alert("格式不对");   
7}   
8</script>

---------------------------------------------------------------

http://expert.csdn.net/Expert/topic/2134/2134827.xml?temp=.9726068

这个里面多的是呀

Web Calendar ver 3.0 Author: meizz(梅花雪疏影横斜) mail: [email protected]
Web Calendar ver 2.0 Author: walkingpoison(水晶龙) mail: [email protected] http://expert.csdn.net/Expert/TopicView1.asp?id=1264734
Web Calendar ver 1.0 Author: meizz(梅花雪疏影横斜) mail: [email protected] http://expert.csdn.net/Expert/TopicView1.asp?id=1080595

Published At
Categories with Web编程
Tagged with
comments powered by Disqus