Chinaunix
标题:
js 日历控件
[打印本页]
作者:
超人慢慢飞
时间:
2011-12-20 09:48
标题:
js 日历控件
js日历控件,效果如下:
代码见附件
cal.rar
调用:
<
!DOCTYPE
html
PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>
无标题页
<
/
title
>
<
meta
http-equiv
=
"Content-Type"
content
=
"text/html; charset=gbk"
/
>
<
link
href
=
"cal.css"
rel
=
"stylesheet"
type
=
"text/css"
/
>
<
/
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
id
=
"append_parent"
>
<
/
div
>
<
div
>
<
input
type
=
"text"
id
=
"bday"
name
=
"bday"
size
=
"25"
onclick
=
"showcalendar(event, this)"
onfocus
=
"showcalendar(event, this);if(this.value=='0000-00-00')this.value=''"
value
=
"0000-00-00"
tabindex
=
"20"
/
>
<
/
div
>
<
script
language
=
"javascript"
type
=
"text/javascript"
src
=
"calendar.js"
charset
=
"gbk"
>
<
/
script
>
<
/
form
>
<
/
body
>
<
/
html
>
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2